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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Cumulative for Filtered Period

Hi All

 

I've got the issue where I want my data visuals to be dynamic to the dates but for some reason it's still cumulating data from the previous dates.

 

For example, I have a data set that spreads from 01/01/2016 to the current date. I want to be able to use a drop down menu to select which year to display a chart Jan - Dec.

When I select 2016, it works fine...because I don't have any data from 2015. But when I select 2017, it takes data from 2016 and keeps cumulating into Jan. Anyone know how I can start cumulating only for the date range I've selected?

 

2016.PNG2017.PNG

 

Note, this is my formula:

 

Cumulative Spend = CALCULATE (
    SUM ( [Amount (Excl VAT)] ),
    FILTER (
        ALLSELECTED('Vendor Ledger'[Document Date].[Date]),
        'Vendor Ledger'[Document Date].[Date] <= MAX ( 'Vendor Ledger'[Document Date].[Date] )
     && 'Vendor Ledger'[Document Date].[Date] <= TODAY()  )
)

Thank you

1 ACCEPTED SOLUTION
Anonymous
Not applicable

@Anonymous,

Create your measure using dax below.

Cumulative Spend =TOTALYTD(SUM(SUM ( [Amount (Excl VAT)] ), 'Vendor Ledger'[Document Date].[Date], 'Vendor Ledger'[Document Date].[Date]<=TODAY())



Regards,
Lydia

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

@Anonymous,

Create your measure using dax below.

Cumulative Spend =TOTALYTD(SUM(SUM ( [Amount (Excl VAT)] ), 'Vendor Ledger'[Document Date].[Date], 'Vendor Ledger'[Document Date].[Date]<=TODAY())



Regards,
Lydia

Anonymous
Not applicable

Thanks Lydia!

 

I took out one of the SUMs and it worked a treat!

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.