Forum Discussion
Week-To-Date Cumulative Not Resetting Properly
- 1 year ago
Hello sandy_liew ,
You can use windows function with Partition By clause to get this result. Here is the dax for your reference.
Week_Cumm =
CALCULATE (
SUM ( Test_Table[Total_DRR] ),
WINDOW (
0,
ABS,
0,
REL,
ALL ( Test_Table[Finance_Date], Test_Table[Week_1] ),
ORDERBY ( Test_Table[Finance_Date] ),
,
PARTITIONBY ( Test_Table[Week_1] )
)
)I hope this helps.
Warm Regards,
Neeraj
- 1 year ago
Thank you divyed , it worked perfectly!!
Hello sandy_liew ,
You can use windows function with Partition By clause to get this result. Here is the dax for your reference.
Week_Cumm =
CALCULATE (
SUM ( Test_Table[Total_DRR] ),
WINDOW (
0,
ABS,
0,
REL,
ALL ( Test_Table[Finance_Date], Test_Table[Week_1] ),
ORDERBY ( Test_Table[Finance_Date] ),
,
PARTITIONBY ( Test_Table[Week_1] )
)
)
I hope this helps.
Warm Regards,
Neeraj
Thank you divyed , it worked perfectly!!