Forum Discussion

gobrien06's avatar
gobrien06
Frequent Visitor
3 years ago
Solved

Cumulative Sum - Fiscal Year (Multiple Years)

Hello, 

 

I need to create a measure to calculate the cumulative sum across Fiscal Years, and show all FY in a visual. I have 3 Fiscal Years in my data. However, all of the formulas I have tried only provide the cumulative sum for one Fiscal Year. I need the resulting measure to display with Cumulative or Running Total on the Y Axis, Month on the X Axis, and FY as the Legend. 

 

This is the current formula:

Cumulative YTD =
VAR MaxDate = MAX ( 'Date'[Date] )
RETURN
    CALCULATE ( [SB Sales Sum] ,
    FILTER( ALL( 'Date' ), 'Date'[Date] <= MaxDate && 'Date'[Fiscal Year] = MAX( 'Date'[Fiscal Year])))
 
Also, the SB Sales Sum formula is as follows:
SB Sales Sum = 
CALCULATE(SUM(Sales[Small Business]), Sales[Small Business] = 1)
 
I have also tried the following formula, which results in the same issue: 
Cumulative Total SB =
CALCULATE( SUMX( FILTER( Sales, Sales[Small Business] = 1), [SB Sales]),
DATESYTD('Date'[Date], "30/9") )

 

This is the current visual. 

 

 

This is a sample of my Date table

 

The Date Table is connected to the Sales Table on the Sales Date Column. 

 

 

 

2 Replies