Forum Discussion

brockry1's avatar
brockry1
Icon for Helper II rankHelper II
1 year ago
Solved

Running Total by Period

How do I create a measure using DAX to calculate the running total from the second column? 

  • Hello brockry1 ,

    Could you try below dax code. But before creating dax code there is a need that a new column includes period such as 01,02 etc. I called PeriodIndex in dax code.

     

     

    Running Total =
    CALCULATE(
        SUM('Visits'[Visit Target Per Period]),
        FILTER(
            ALL('Visits'),
            'Visits'[PeriodIndex] <= MAX('Visits'[PeriodIndex])
        )
    )

     

     

    Kind Regards,
    Gรถkberk UzuntaลŸ

    ๐Ÿ“Œ If this post helps, then please consider Accepting it as a solution and giving Kudos โ€” it helps other members find answers faster!

    ๐Ÿ”— Stay Connected:
    ๐Ÿ“˜ Medium |
    ๐Ÿ“บ YouTube |
    ๐Ÿ’ผ LinkedIn |
    ๐Ÿ“ท Instagram |
    ๐Ÿฆ X |
    ๐Ÿ‘ฝ Reddit |
    ๐ŸŒ Website |
    ๐ŸŽต TikTok |

1 Reply

  • Hello brockry1 ,

    Could you try below dax code. But before creating dax code there is a need that a new column includes period such as 01,02 etc. I called PeriodIndex in dax code.

     

     

    Running Total =
    CALCULATE(
        SUM('Visits'[Visit Target Per Period]),
        FILTER(
            ALL('Visits'),
            'Visits'[PeriodIndex] <= MAX('Visits'[PeriodIndex])
        )
    )

     

     

    Kind Regards,
    Gรถkberk UzuntaลŸ

    ๐Ÿ“Œ If this post helps, then please consider Accepting it as a solution and giving Kudos โ€” it helps other members find answers faster!

    ๐Ÿ”— Stay Connected:
    ๐Ÿ“˜ Medium |
    ๐Ÿ“บ YouTube |
    ๐Ÿ’ผ LinkedIn |
    ๐Ÿ“ท Instagram |
    ๐Ÿฆ X |
    ๐Ÿ‘ฝ Reddit |
    ๐ŸŒ Website |
    ๐ŸŽต TikTok |