Forum Discussion
Dynamic measure, based on period?
- 7 years ago
Hi kevpuk,
Could you mean to calculate the [Fall] and [Trip] measure with sample data for 2016, 2017, 2018 and use another measure for 2019?
If so, could you have tried with IF function?
Fall = IF(CALCULATE(MAX('sample_data'[Period])<>"2019"),calculate(Sum(sample_data[Value]),sample_data[Metric]="Fall"),0)(You could replace the 0 in the formula to the measure of calculating "2019")
Regards,
Daniel He
Hi
Thanks for your response.
I have created a simple sampl .pbix file......on the left hand side of the page are simple matrix visuals, with annual data from 2016-2019......to the right, with red borders around, I have created a couple of simple matrix visuals using measures to provide an 'annualised' view of the current year (simply, item count/days in year * 365).
https://1drv.ms/u/s!AqSWpWAD-qDBgu1E5Lif9Ne6lMwuvg
What I am trying to achieve is a method to make one visual that - in this case - would show actual numbers for 2016, 2017 and 2018, but would show the annualised value for 2019.
Thanks for taking the time to look at this :)
Hi kevpuk,
Could you mean to calculate the [Fall] and [Trip] measure with sample data for 2016, 2017, 2018 and use another measure for 2019?
If so, could you have tried with IF function?
Fall = IF(CALCULATE(MAX('sample_data'[Period])<>"2019"),calculate(Sum(sample_data[Value]),sample_data[Metric]="Fall"),0)
(You could replace the 0 in the formula to the measure of calculating "2019")
Regards,
Daniel He
- kevpuk7 years agoFrequent Visitor
Hi Daniel
Well, that is elegant, nice and simple - thank-you very much :)