Forum Discussion
Running Total for an Average Dax Measure.
Hi guys,
I am getting nuts, about this litte problem and I think you experts outside know the answer very fast.
My dataset:
I created a measure which uses the Week-Offest from the Date Table to select only the last 12 weeks of the dataset.
So far so good. When I select from the Date Table the "Short Day Name" and put the "AVG 12 weeks" measure in a table everthing works fine.
Now there comes my probelm: I want to do a running total of the average values for MO, DI ,MI a.s.o.
I created a measure which should calculate a non-date running total based on the "Day of week Number" which I have in my time table and display it for the Day Name Short (MO, DI, MI a.s.o). As you can see the running totals are not running. My expectation was that:
Mo 47,27
Di 90,08
Mi 143,88 a.so.
What I am doing wrong? Urgent help is needed
Thanks in advance
3 Replies
- AnonymousNot applicable
Hi superpowerteam ,
Please have a try. Modify the measure.
rt avg = VAR reihenfolge = SELECTEDVALUE ( DimDates[Days of week number] ) RETURN SUMX ( FILTER ( ALLSELECTED ( DimDates ), DimDates[Days of week number] <= reihenfolge ), [AVG 12 Weeks] )How to Get Your Question Answered Quickly
If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .
Best Regards
Community Support Team _ RongtieIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- superpowerteamFrequent Visitor
Hi,
thank you for the code. Unfortunately you code is not working. As you can see your code delivers the result which I marked with the red cross. The result should be as you can see in the prepared column.
Any other ideas?
- Ashish_Mathur
Super User
Hi,
Share the download link of the PBI file.