Forum Discussion

fabdata1207's avatar
fabdata1207
Regular Visitor
3 years ago
Solved

Simple Running Count

Hi all   I need to do a simple running total with sort by date   in the below sample I need to create a measure as the same of Running Total and that counts the CODE and sort based on Date exactl...
  • ryan_mayu's avatar
    3 years ago

    fabdata1207 

    you can try this

     

    Measure = 
    VAR _total=CALCULATE(DISTINCTCOUNT('Table'[CODE]),FILTER(all('Table'),'Table'[Date]<=max('Table'[Date])))
    return if (ISFILTERED('Table'[CODE]),_total, DISTINCTCOUNT('Table'[CODE]))