Forum Discussion
cumulative total tooltip
- 9 months ago
HI Anonymous
If I understand correctly, your custom tooltip needs to show cumulative total without getting filtered for that month.
In that case it will always show a single value right?
Can you add little bit more details here please?
Also the DAX that you have shared above has got an ALLSELECTED which is basically filtering the totals for the month when shown on a custom tootltip.
If you modify it to ALL, then it should always show your one cumulative total irrespective of what month you hover it on.
Basically the updated dax will be:
14.2 Cumulative Actual Cost CY running total in Month = VAR SelectedMaxDate = MAX ( 'Dim_Calender'[Date] ) -- from slicer VAR CurrentRowDate = MAX ( 'Su_Calender Trend'[Date] ) -- from visual context RETURN IF ( CurrentRowDate <= SelectedMaxDate, CALCULATE ( [14.2 Cumulative Actual Cost CY], FILTER ( CALCULATETABLE ( SUMMARIZE ( 'Su_Calender Trend', 'Su_Calender Trend'[Monthnum], 'Su_Calender Trend'[Month], 'Su_Calender Trend'[Date] ), ALL ( 'Su_Calender Trend' ) ), ISONORAFTER ( 'Su_Calender Trend'[Monthnum], MAX ( 'Su_Calender Trend'[Monthnum] ), DESC, 'Su_Calender Trend'[Month], MAX ( 'Su_Calender Trend'[Month] ), DESC ) ) ), BLANK () )Let me know if this helps.
HI Anonymous
If I understand correctly, your custom tooltip needs to show cumulative total without getting filtered for that month.
In that case it will always show a single value right?
Can you add little bit more details here please?
Also the DAX that you have shared above has got an ALLSELECTED which is basically filtering the totals for the month when shown on a custom tootltip.
If you modify it to ALL, then it should always show your one cumulative total irrespective of what month you hover it on.
Basically the updated dax will be:
14.2 Cumulative Actual Cost CY running total in Month =
VAR SelectedMaxDate =
MAX ( 'Dim_Calender'[Date] ) -- from slicer
VAR CurrentRowDate =
MAX ( 'Su_Calender Trend'[Date] ) -- from visual context
RETURN
IF (
CurrentRowDate <= SelectedMaxDate,
CALCULATE (
[14.2 Cumulative Actual Cost CY],
FILTER (
CALCULATETABLE (
SUMMARIZE (
'Su_Calender Trend',
'Su_Calender Trend'[Monthnum],
'Su_Calender Trend'[Month],
'Su_Calender Trend'[Date]
),
ALL ( 'Su_Calender Trend' )
),
ISONORAFTER (
'Su_Calender Trend'[Monthnum], MAX ( 'Su_Calender Trend'[Monthnum] ), DESC,
'Su_Calender Trend'[Month], MAX ( 'Su_Calender Trend'[Month] ), DESC
)
)
),
BLANK ()
)
Let me know if this helps.