Power BI Exchange

Please login or click SIGN UP FOR FREE to create your PowerBIUG account to join this user group.
 View Only
  • 1.  Running Totals with blank values.

    Posted Oct 28, 2022 06:00 AM
    Hello.
    I am losing my mind, i am a beginner with DAX. I have a running total which is working to an extent,
    I have a filter on the page to only show me for the year 2022, hence why its starting from Jan 2022.

    Firstly... I have a graph to represent this data and Oct 2022 and Nov 2022 is showing the last running Total, which as a result is ruining my graph, how can i reset this to be zero?




    Secondly, If i filter down the report i get this


    The months that were blank are still show the previous recurring total. How do i get them to return 0.

    Below is my formulae

    Running total 

    Running Total =
    (
        CALCULATE (
            [Over 30 Days - All Time],
            FILTER ( ALL ( DateTable[Date] ), DateTable[Date] <= MAX ( DateTable[Date] ) )
        )
    )

    Over 30 Days
    Over 30 Days =
    CALCULATE (
        [All Data],
        'All Data'[state] = "Active",
        'All Data'[Age] >= SELECTEDVALUE ( Threshold[Threshold] )
    )

    The threshold value is 30.

    ------------------------------
    V S
    Analyst
    ------------------------------


  • 2.  RE: Running Totals with blank values.

    Posted 27 days ago
    @V S,
    What if you change your Running Total formula so that it looks something like this:
    Running Total =
    (
        CALCULATE (
            [Over 30 Days - All Time],
            FILTER ( ALL ( DateTable[Date] ), DateTable[Date] <= MAX ( DateTable[Date] ) && DateTable[Date] <= MAX( 'All Data'[Date] ) )
        )
    )​

    Will that give you the results you are looking for?  If not, perhaps you can share a .pbix file with us and someone will dig into it to help you.
    Kaz.

    ------------------------------
    Kaz Shakir
    Sr. Program Manager, Asset Planning
    TN
    ------------------------------