okviz / free-visuals

Power BI free custom visuals
MIT License
24 stars 7 forks source link

Card with States - Allow target comparison when using trendline #161

Closed djpirra closed 4 years ago

djpirra commented 4 years ago

Description Allow direct target comparison to work when using trendlines.

To reproduce Add one attribute to the Trendline that is not from date dimension but is reflecting the date (example when using dynamic axis for date, months, years etc... ) Add one measure on the "Measures" and set it to SUM. Add one measure on the "Targets"

The reference value will not be showing correctly. It should ignore the trendline and compare target measure vs main measure.

Affected environment

okviz commented 4 years ago

When there is a trendline, the value and the reference are defined by the value you set in the Data Label value option. image

In your example, the sum of the main measure values and the sum of the targets are the same, so the change is 0%. image

If you want to compare only the last data point or the first one, please change the value displayed by the data label.