The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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 ?
thank you
Solved! Go to Solution.
@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.
@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:
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
Octorber 2020
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
@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]
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?
Best Regards
Sinan
User | Count |
---|---|
78 | |
74 | |
43 | |
32 | |
28 |
User | Count |
---|---|
104 | |
93 | |
52 | |
50 | |
46 |