Forum Discussion
DAX Query for Running Total
Hi,
I created a simple view of 3 columns, (city name, date of completion for that city, a flag as 1 for filtering cities with completion date) like below
now i created a measure (like a new column) to find a running total of completed cities as date move forward like below: (expected column for running total)
I wrote a below Measure and surprisingly its working on my personal machine, but not working on my work machine.
Measure = CALCULATE(SUM(MYVIEW[FLAG]), FILTER(ALL(MYVIEW[COMPLETIONDATE]),MYVIEW[COMPLETIONDATE]<= MAX(MYVIEW[COMPLETIONDATE])))
Instead I get below reponse :
what am i doing wrong, as i said, same query is working fine on my personal laptop
Try This
Measure = CALCULATE(SUM(MYVIEW[FLAG]), FILTER(ALL(MYVIEW),MYVIEW[COMPLETIONDATE]<= MAX(MYVIEW[COMPLETIONDATE])))
2 Replies
- FarhanAhmedCommunity Champion
Try This
Measure = CALCULATE(SUM(MYVIEW[FLAG]), FILTER(ALL(MYVIEW),MYVIEW[COMPLETIONDATE]<= MAX(MYVIEW[COMPLETIONDATE])))- ankit48365Regular Visitor
Thanks Farhan, That resolved it 🙂
so for my future understanding, we shuld apple to undo the filter on all columns, rather then jus one column ....