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
Sperling
Advocate II
Advocate II

Cumulative measure for tooltip

I'm interested in a cumulative measure that is based on a dynamic period for a tooltip.

 

I have a table with the last 31 days showing a daily index, and when I plug a cumulative measure into it, it works fine. However when I instead apply it as a tooltip it only shows the daily values.

I could solve it using the TOTALMTD measure, however that measure is not useful for periods that go across two different months.


This is what works as cumulative total in table, but not it tooltip:

Result =
VAR Filtered =
FILTER(
ALLSELECTED('Date'[Date]),
ISONORAFTER('Date'[Date], MAX('Date'[Date]), DESC)
)

RETURN
CALCULATE(
'Sales'[Revenue],
Filtered
)
 

Any suggestions?

10 REPLIES 10
v-jingzhang
Community Support
Community Support

Hi @Sperling 

 

Use ALL instead of ALLSELECTED.

Cumulative = CALCULATE(SUM(Sales[Revenue]),FILTER(ALL('Date'[Date]),ISONORAFTER('Date'[Date], MAX('Date'[Date]), DESC)))

vjingzhang_0-1643877376040.png

 

And you can also use below measure for cumulative total. 

Result = 
var _maxDate = MAX('Date'[Date])
return
CALCULATE(SUM(Sales[Revenue]),ALL('Date'[Date]),'Date'[Date]<=_maxDate)

 

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

Thanks for the reply!

I don't know if I'm missing something, but when I use my dataset with older sales values as well, I get a cumulative measure up to the current max date.

I'm interested in a cumulative measure for the days in my date filter for the page.

Hi @Sperling 

 

Do you put Date table's Date column on X axis of the column chart and into your date filter? How do you set your date filter? Is it possible to provide a sample pbix here (after removing sensitive data)? 

 

Regards,
Jing

@v-jingzhang 
Hi again,

 

I've identified the issue in your pbix file too. It happens when I add a slicer based on date and adjust that.

 

When I add a slicer to your file and move the first date a bit forward, the cumulative tooltip still shows the cumulative value as if the slicer date filter was ignored.

parry2k
Super User
Super User

@Sperling I did a video on this, check it out here https://youtu.be/THY8y8UZuww

 

 

 

Follow us on LinkedIn and YouTube.gif to our YouTube channel

 

Check my latest video on Filters and Sparklines https://youtu.be/wmwcX8HvNxc

 

I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!

 

Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.

 

 



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Replying here as well.
Thanks for the answer, but unfortunately this just gives me a cumulative value for the whole period before "max date", whereas I'm interested in specific period ranges based on my date filter on the page (e.g. last 31 days).

Sperling
Advocate II
Advocate II

Any ideas as to why it's not working?


Since the only reply said it works I tried to make a simple test by making my own excel sheet to import into Power BI with 2 columns.

One for every date in a month and one with a "sales value" of 1 for every date entry.

 

This is the result:

Sperling_1-1643613224565.png

 

As it can be seen the cumulative measure works fine in the graph, but not in the tooltip.

 

I've added the TOTALMTD measure to show how that works, but not my cumulative one.

 

Sperling_0-1643727505119.png

 

freginier
Super User
Super User

why do you say it doesn't work? I use your measure as tooltip in bar chart and it works.

I've tried recreating the steps and it doesnt work for me.

 

Even when I make a line/bar chart with dates on the axis and the cumulative measure as the value, I can see the cumulative measure working fine. However when I add the same cumulative measure as tooltip to the graph it shows the daily value instead of the cumulative one.

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