Forum Discussion
Running total
Hello All,
Would need your help in the DAX running total for the below scenario (running total for the MTD - month to date and PM - previous month):-
My Dax:
RunningTotal =
VAR
CurrentDay = MAX ( 'Data Source'[Weekday] )
RETURN CALCULATE (
SUMX ( VALUES ( 'Data Source'[Weekday] ), sum('Data Source'[Standard Quantity KG 3rd Party]) ),
'Data Source'[Weekday] <= CurrentDay
)
First time I posted my question here, thanks for your kind assistance.
Unable to send the BI file over here, do let me know should you need it.
Thanks!!
Hello friend
This shall do it
Cumulative = SUMX ( FILTER ( ALLEXCEPT ( 'Data Source', 'Data Source'[Reformat], 'Data Source'[SH - Country docum.] ), 'Data Source'[Weekday] <= SELECTEDVALUE ( 'Data Source'[Weekday] ) ), CALCULATE ( SUM ( 'Data Source'[Standard Quantity KG 3rd Party] ) ) )
7 Replies
- Zubair_MuhammadCommunity Champion
Try this Measure
Cumulative = IF ( HASONEVALUE ( 'Data Source'[Weekday] ), SUMX ( FILTER ( ALL ( 'Data Source' ), 'Data Source'[Weekday] <= VALUES ( 'Data Source'[Weekday] ) ), 'Data Source'[Standard Quantity KG 3rd Party] ) )- tanctRegular Visitor
Dear Zubair,
It is still not working. This is my first time publish my issue here, do you know how to share the pbix file over here, it would be more efficient in this way.
- Zubair_MuhammadCommunity Champion
Hi tanct
You can upload your file to onedrive or google drive and share the link here using "insert/edit link" option