Forum Discussion

GillyGils's avatar
GillyGils
Frequent Visitor
3 years ago
Solved

Optimize Running Total

Hi All, I'm currently running the following DAX code for a Running Total based on a calculated measure. I'm looking to optimise the below DAX code?   VAR _Date = MAX ('Fact_Table'[Date]) VAR _Dat...
  • v-zhangti's avatar
    v-zhangti
    3 years ago

    Hi, GillyGils 

     

    You can try the following methods

    Measure:

    Running Head Count = SUMX(FILTER(ALL('Table'),[Date]<=SELECTEDVALUE('Table'[Date])),[Head Count])

    Is this the result you expect?

     

    Best Regards,

    Community Support Team _Charlotte

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.