Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
joshig
Frequent Visitor

How to obtain Month range from a date column along with cumulative total

I have the following dataset with date , amount and another column Spending. The Spending column can potentially have two values Expenditures and Non Expenditures. And I need to obtain cumulative/Running total based on the amount column corresponding to Date column that should display in the month range.

 

data.jpg

so i need something like below in my table/tablix visualizer from the data above

report.jpg

 

I have already  wrote measures for Expenditures and NonExpenditures

Expenditures= CALCULATE( SUM(AllExpendituresDataFormatted[AMOUNT]),AllExpendituresDataFormatted[SPENDING] = "Expenditure") and is able to represent data 
DateExpendituresNonExpenditures
June 2021121212123232323
July 20212323232323323
 
any help/suggestions/directions would be greatly appreciated.
2 ACCEPTED SOLUTIONS
v-easonf-msft
Community Support
Community Support

Hi, @joshig 

You need enter the following data table which can also be easily created in excel.

62.png

Then try formulas as below:

cumulative amount_Expenditures = 
CALCULATE (
    AllExpendituresDataFormatted[Expenditures],
    FILTER (
        AllExpendituresDataFormatted,
        AllExpendituresDataFormatted[Date] >= SELECTEDVALUE ( 'Table'[Start Date] )
            && AllExpendituresDataFormatted[Date] <= SELECTEDVALUE ( 'Table'[End Date] )
    )
)
cumulative amount_NonExpenditures = 
CALCULATE (
    AllExpendituresDataFormatted[NonExpenditures],
    FILTER (
        AllExpendituresDataFormatted,
        AllExpendituresDataFormatted[Date] >= SELECTEDVALUE ( 'Table'[Start Date] )
            && AllExpendituresDataFormatted[Date] <= SELECTEDVALUE ( 'Table'[End Date] )
    )
)

sample result:

63.png

Best Regards,
Community Support Team _ Eason

View solution in original post

v-easonf-msft
Community Support
Community Support

Hi, @joshig 

Can you tell me if your problem is solved?

If you still need help, please share more information about it.

Best Regards,
Community Support Team _ Eason

View solution in original post

5 REPLIES 5
v-easonf-msft
Community Support
Community Support

Hi, @joshig 

Can you tell me if your problem is solved?

If you still need help, please share more information about it.

Best Regards,
Community Support Team _ Eason

v-easonf-msft
Community Support
Community Support

Hi, @joshig 

You need enter the following data table which can also be easily created in excel.

62.png

Then try formulas as below:

cumulative amount_Expenditures = 
CALCULATE (
    AllExpendituresDataFormatted[Expenditures],
    FILTER (
        AllExpendituresDataFormatted,
        AllExpendituresDataFormatted[Date] >= SELECTEDVALUE ( 'Table'[Start Date] )
            && AllExpendituresDataFormatted[Date] <= SELECTEDVALUE ( 'Table'[End Date] )
    )
)
cumulative amount_NonExpenditures = 
CALCULATE (
    AllExpendituresDataFormatted[NonExpenditures],
    FILTER (
        AllExpendituresDataFormatted,
        AllExpendituresDataFormatted[Date] >= SELECTEDVALUE ( 'Table'[Start Date] )
            && AllExpendituresDataFormatted[Date] <= SELECTEDVALUE ( 'Table'[End Date] )
    )
)

sample result:

63.png

Best Regards,
Community Support Team _ Eason

This is awesome!! Kudos..

amitchandak
Super User
Super User

@joshig , to me it seems like YTD with year start in July

 

Assuming you have measure Expenditures, NonExpenditures with help from date table 

 

YTD Expenditures= CALCULATE([Expenditures],DATESYTD('Date'[Date],"6/30"))

 

YTD NonExpenditures = CALCULATE([NonExpenditures ],DATESYTD('Date'[Date],"6/30"))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Thanks Amit!!  but the issue is how do we get a column that have months as cumulative months and then apply the cumulative amount.

dates.jpg

 

I tried as you suggested but its not rolling up. Am i missing something?

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors