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,
I'm trying to calculate at Running Total over dates and then group by month, quarter and year.
I have this measure showing a running total of sales.
It works just fine on regulary dates, but if I group by year or sort out a year it doesn't work anymore:
What's wrong with my measure?
Solved! Go to Solution.
Hi @Anonymous ,
Please try this
Total Sales Amount RT =
VAR MaxDate =
MAX ( 'Calendar'[Date] )
VAR Result =
CALCULATE (
[Total Sales Amount],
FILTER ( ALLSELECTED ( 'Calendar' ), 'Calendar'[Date] < MaxDate )
)
RETURN
Result
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
Please try this
Total Sales Amount RT =
VAR MaxDate =
MAX ( 'Calendar'[Date] )
VAR Result =
CALCULATE (
[Total Sales Amount],
FILTER ( ALLSELECTED ( 'Calendar' ), 'Calendar'[Date] < MaxDate )
)
RETURN
Result
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thanks, but this only works if you are after YTD.
It will start over 1. jan.
I need it to be a running total regardless of the year.
Hi Krestensb,
If you want it by year use totalytd, it will do it automatically
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 |
---|---|
110 | |
108 | |
88 | |
76 | |
66 |
User | Count |
---|---|
126 | |
112 | |
99 | |
82 | |
73 |