Forum Discussion
need help on dax code rolling MTD value
- 4 months ago
Hi again,
now this result
It matches yours apart from Fiscal week 4, but I think the above value is the correct one, am I right? Your value is 11,313
Code
Rolling MTD =VAR MaxDate = MAX ( 'Date'[Date] )VAR MaxMonth = MAX ( 'Date'[FiscalMonthFullName] )VAR DatesToConsider =ADDCOLUMNS(CALCULATETABLE (VALUES ( 'Date'[Date] ),'Date'[Date] <= MaxDate,'Date'[FiscalMonthFullName] = MaxMonth,REMOVEFILTERS( 'Date' )),"@ROLL", IF ( NOT ISEMPTY( CALCULATETABLE('Fact') ), [Rolling WeekValue] ))RETURNIF (NOT ISEMPTY ( Fact ) && ISINSCOPE( 'Date'[Date] ),SUMX (DatesToConsider,[@ROLL]))File attached
If this helped, please consider giving kudos and mark as a solution
me in replies or I'll lose your thread
Want to check your DAX skills? Answer my biweekly DAX challenges on the kubisco Linkedin page
Consider voting this Power BI idea
Francesco Bergamaschi
MBA, M.Eng, M.Econ, Professor of BI
- 4 months ago
HI SP_1
modified the code accordingly. File attached
Best
If this helped, please consider giving kudos and mark as a solution
@me in replies or I'll lose your thread
Want to check your DAX skills? Answer my biweekly DAX challenges on the kubisco Linkedin page
Consider voting this Power BI idea
Francesco Bergamaschi
MBA, M.Eng, M.Econ, Professor of BI
- 4 months ago
Hi FBergamaschi ,
Thanks for you help and its working.
HI SP_1
modified the code accordingly. File attached
Best
If this helped, please consider giving kudos and mark as a solution
@me in replies or I'll lose your thread
Want to check your DAX skills? Answer my biweekly DAX challenges on the kubisco Linkedin page
Consider voting this Power BI idea
Francesco Bergamaschi
MBA, M.Eng, M.Econ, Professor of BI
Hi FBergamaschi ,
Thanks for you help and its working.