Forum Discussion
Deviation from Baseline Value
- Anonymous6 years ago
I see the problem you need to all(table) to find the actual minimum date, to correct that please change the dax to the following.
Measure = VAR _BaseValue = CALCULATE(SUM([Value]),FILTER('Table',[Date]=CALCULATE(MIN([Date]),ALL('Table')))) VAR _CurrentValue = Sum(Value) Return _CurrentValue - _BaseValue
Paul Zheng _ Community Support Team
If this post helps, then consider Accept it as the solution to help other members find it faster.
Anonymous can you give an example of what you mean by baseline by date?
- Anonymous6 years agoNot applicable
Sure!
I would like to have a dynamic measure, which calculates the % difference starting from a fixed base date.
E.g. I set a slicer to the months between January and Aprich
--> So 1st of January is my "Baseline vlaue", then the measure should calculate the % difference from 1st of January to 1st of February, as well as 1st of January to 1st of March, 1st of January to 1st of April.
Or in other words:
What I need is to be able to create an index chart which shows based on these date parameters the % change of the value over the historical period based on the time period selection I make. I should be able to use the slicers to choose the start and end date.- parry2k6 years ago
Super User
Anonymous try this
New Measure = VAR __baseDate = MIN ( DateTable[Date] ) VAR __baseValue = CALCULATE ( [Your Measure], DateTable[Date] = __baseDate] ) RETURN [Your Measure] - __baseValueI would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!
⚡Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.⚡
- Anonymous6 years agoNot applicable
Thanks for the reply, it almost works. The only problem is, when I put it into a line cart, the change is always 0.