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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
sinanalmac
Resolver I
Resolver I

Running Total calculate in Tooltip

Hi all , 

 

I created running total measure  

 

Measure = CALCULATE(
SUM(Rpl_Satis_Flow_Unisel[TURNOVER]), FILTER(ALLSELECTED(Rpl_Satis_Flow_Unisel),
Rpl_Satis_Flow_Unisel[DATE].[Day]<=MAX(Rpl_Satis_Flow_Unisel[DATE].[Day])
))


It  works fine 

 

When put the this mesause in tooltip page  it doesn't run  correctly.

How Can Run this code in Tool tip correctly ?

 

 

sinanalmac_0-1633365702597.png

 

 

 thank you

 

 

 

1 ACCEPTED SOLUTION
parry2k
Super User
Super User

@sinanalmac it is not as straightforward as it looks like but here is the solution, you need to understand the row context to understand the problem.

 

To do it right, anytime you are doing date calculation, it is a best practice to add a Calendar/Date dimension in your model, you can add one following my blog post here Create a basic Date table in your data model for Time Intelligence calculations | PeryTUS IT Solutio...

 

After the above table is in the model, set the relationship with the transaction table on the date column, it will be one to many relationship.

 

Now add a Running Total measure 

 

RT Turnover = 
CALCULATE ( 
    SUM ( YourTable[Turnover] ),  
    FILTER ( 
            ALL ( 'Calendar' ), 
            'Calendar'[Date] <= MAX ( 'Calendar'[Date] ) 
     ), 
    VALUES ( 'Calendar'[Month] ) 
)

 

In slicer, add month from the calendar table and in table visual, use date from calendar table and turnover column, on tooltip page, use above measure to show the running total and this will do it.

 

Follow us on LinkedIn

 

Check my latest blog post The Power of Using Calculation Groups with Inactive Relationships (Part 1) (perytus.com) 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.

View solution in original post

5 REPLIES 5
parry2k
Super User
Super User

@sinanalmac it is not as straightforward as it looks like but here is the solution, you need to understand the row context to understand the problem.

 

To do it right, anytime you are doing date calculation, it is a best practice to add a Calendar/Date dimension in your model, you can add one following my blog post here Create a basic Date table in your data model for Time Intelligence calculations | PeryTUS IT Solutio...

 

After the above table is in the model, set the relationship with the transaction table on the date column, it will be one to many relationship.

 

Now add a Running Total measure 

 

RT Turnover = 
CALCULATE ( 
    SUM ( YourTable[Turnover] ),  
    FILTER ( 
            ALL ( 'Calendar' ), 
            'Calendar'[Date] <= MAX ( 'Calendar'[Date] ) 
     ), 
    VALUES ( 'Calendar'[Month] ) 
)

 

In slicer, add month from the calendar table and in table visual, use date from calendar table and turnover column, on tooltip page, use above measure to show the running total and this will do it.

 

Follow us on LinkedIn

 

Check my latest blog post The Power of Using Calculation Groups with Inactive Relationships (Part 1) (perytus.com) 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.

Hi I would like to  ask question About your code. The cod is working perfectly for the date september 2021 and earlier. 
Example:

sinanalmac_0-1634848848443.png

 

But When I selected October(Last mont)The number are going huge. We are still in october. the month doesnt completer yet.  IT seems like adding previous  year The Same month  value. 

Ocotober 2021

sinanalmac_1-1634849544558.png

 

Octorber 2020

sinanalmac_2-1634849690969.png

I didn figure out. Could you help me please?
 
Best Regards
Sinan 

Hi , @parry2k  This is definitely the Answer I'm trying to find

Thank you so much 
Best Regards
Sinan 

amitchandak
Super User
Super User

@sinanalmac , try to avoid using date hierarchy element in this. If there is a timestamp then create a date column

measure like 

Measure = CALCULATE(
SUM(Rpl_Satis_Flow_Unisel[TURNOVER]), FILTER(ALLSELECTED(Rpl_Satis_Flow_Unisel),
Rpl_Satis_Flow_Unisel[DATE]<=MAX(Rpl_Satis_Flow_Unisel[DATE])
))

 

 

 

 

Also the year , qtr and month in the visual should date part of the date Rpl_Satis_Flow_Unisel[DATE]

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

Hi @amitchandak 
Thank you  for your reply .  I removed   the  day item from  Formulas but nothing changed. 😞
 It  still shows only the current value.

Is there anything I can do  about it?

 

sinanalmac_0-1633370783105.png

 


Best Regards
Sinan

 

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

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