Forum Discussion
tanct
8 years agoRegular Visitor
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 ...
- 8 years ago
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] ) ) )
Zubair_Muhammad
8 years agoCommunity 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]
)
)tanct
8 years agoRegular 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_Muhammad8 years agoCommunity Champion
Hi tanct
You can upload your file to onedrive or google drive and share the link here using "insert/edit link" option
- tanct8 years agoRegular Visitor
https://drive.google.com/file/d/0B_Wuqq42mXSEcVNJalBydGFyQmM/view?usp=sharing
Many thanks for your reply and prompt reply, could you please click on the link for PBIX download for your shared expertise.
Thanks@!
- Zubair_Muhammad8 years agoCommunity Champion
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] ) ) )