Forum Discussion

EstherBR's avatar
EstherBR
Helper III
10 months ago
Solved

Running total as a Tooltip

Hi,

 

I have the following table:

I have created the following line chart with the cumulative sum of sales:

Running Total =
CALCULATE(
    SUM(Sheet1[Sales]),
    FILTER(
        ALLSELECTED(Sheet1[Date]),
        Sheet1[Date] <= MAX(Sheet1[Date])
    )
)

I have to create a custom tooltip that displays the Sum of sales and the sales running total. But The running total of the tooltip displays just the sum of sales. How can I fix this?

Thanks!

 

  • Hi,

    Please try something like below.

    For this kind of semantic model, that has only one table, try using ALL DAX function.

     

     

    Running Total = 
    CALCULATE(
        SUM(Sheet1[Sales]),
        FILTER(
            ALL(Sheet1[Date]),
            Sheet1[Date] <= MAX(Sheet1[Date])
        )
    )

      

2 Replies

  • Hi,

    Please try something like below.

    For this kind of semantic model, that has only one table, try using ALL DAX function.

     

     

    Running Total = 
    CALCULATE(
        SUM(Sheet1[Sales]),
        FILTER(
            ALL(Sheet1[Date]),
            Sheet1[Date] <= MAX(Sheet1[Date])
        )
    )