Quantcast
Viewing all articles
Browse latest Browse all 217177

DAX - Running Total YTD

Hi,

 

I am calculating the MTD and YTD for which I have used below statements.

 

MTDValue = TOTALMTD(SUM(RetailerSummary[Tran_Amount]),RetailerSummary[Transaction Date])

& for 

YTDValue = 

VAR RowDate = RetailerSummary[Transaction Date]

RETURN CALCULATE (SUM(RetailerSummary[Tran_Amount]),
FILTER(RetailerSummary,RetailerSummary[Transaction Date]<=RowDate

&&  

YEAR(RetailerSummary[Transaction Date] = YEAR(RowDate))

))

 

The issue I am facing in YTD is that it calculate YTD value instead of FiscalYTD.

Also on "Visual level filters" I am taking the max of YTD value. Is this method correct or not? Right now I am getting the correct values (YTD and not fiscal YTD)

 

Could anyone please help me to fix this issue?

 

Thanks,

Anupam


Viewing all articles
Browse latest Browse all 217177

Trending Articles