Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
This is the situation:
So I have a matrix where I now have selected (slicers not in picture) years 2023 and 2024. LBE1 and LBE2.
Addendum is the value (measure) of the matrix.
What I am trying to do it to make a measure variance (var) which for instance takes 2024 LBE2 and subtracts 2023 LBE2.
Did not succeed so I tried first getting the value of the year before.
But as you can see it only gives me the total.
Is there a way to get what I want?
Solved! Go to Solution.
@rpinxt , previousyear will the full value of last year, use sameperiodlastyear
example
Year behind Sales = CALCULATE(SUM(Sales[Sales Amount]),dateadd('Date'[Date],-1,Year))
Year behind Sales = CALCULATE(SUM(Sales[Sales Amount]),SAMEPERIODLASTYEAR('Date'[Date]))
Time Intelligence, Part of learn Power BI https://youtu.be/cN8AO3_vmlY?t=27510
Time Intelligence, DATESMTD, DATESQTD, DATESYTD, Week On Week, Week Till Date, Custom Period on Period,
Custom Period till date: https://youtu.be/aU2aKbnHuWs&t=145s
@rpinxt , previousyear will the full value of last year, use sameperiodlastyear
example
Year behind Sales = CALCULATE(SUM(Sales[Sales Amount]),dateadd('Date'[Date],-1,Year))
Year behind Sales = CALCULATE(SUM(Sales[Sales Amount]),SAMEPERIODLASTYEAR('Date'[Date]))
Time Intelligence, Part of learn Power BI https://youtu.be/cN8AO3_vmlY?t=27510
Time Intelligence, DATESMTD, DATESQTD, DATESYTD, Week On Week, Week Till Date, Custom Period on Period,
Custom Period till date: https://youtu.be/aU2aKbnHuWs&t=145s
Ah thanks @amitchandak for pointing that out!
Makes sence that previousyear would be full year.
Thanks for pointing me to the sameperiodlastyear measure!
Works like a charm.
User | Count |
---|---|
97 | |
87 | |
77 | |
67 | |
63 |
User | Count |
---|---|
112 | |
96 | |
95 | |
67 | |
65 |