Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi all ,
Here is my Question again ,
i am getting year over year % Difference by using Quick measure or Dax calculations. But my question is , if I select years randomly from the slicers it is displaying on the previous year difference only not with the selected years as shown in below images.
everything i need is to calculate the year over year difference on the selected year from slicers , and if all years selected it has to display the previous year difference.
from above screenshot :
i need selected year over year percentage diff .
Anyone if you get the dax calculations for selected years with previous selected years percentage difference, Please let me know .
waiting......
Thanks
sandeep
9441181581
Please try the coding below to see if this can match your requirement. Thanks
Proud to be a Super User!
Hi there,
I would try something like (I have not tried this):
total YoY% = VAR currentYear = Dates[Year] VAR preYear = CALCULATE( MAX(Dates[Year]), ALLSELECTED(Dates[Year]), Dates[Year] < currentYear ) RETURN [total] / CALCULATE(total; Dates[Year] = preYear) - 1
Regars,
Kristjan76
@Kristjan76
This measure is not working fine , please let me know any another measure.
Thanks
sandeep
You are right it was not working, you can try this one:
total YoY% = VAR currentYear = IF(HASONEVALUE(Dates[Year]),VALUES(Dates[Year])) VAR yrs = ALLSELECTED(Dates[Year]) VAR preYear = MAXX( FILTER( yrs, Dates[Year] < currentYear ), Dates[Year] ) VAR res = DIVIDE([total] , CALCULATE([total], Dates[Year] = preYear) RETURN IF(NOT(ISBLANK(res)), res - 1)
Regards,
Kristjan
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
111 | |
97 | |
80 | |
69 | |
59 |
User | Count |
---|---|
150 | |
119 | |
104 | |
87 | |
67 |