Forum Discussion
Anonymous
4 years agoNot applicable
Running totals over multiple sites
Hello all, Not sure if I'm asking too much of PowerBI/Power query, or if I'm asking too much of myself 🙂 I have a data table that shows a production value total for 4 sites each day. I need...
- 4 years ago
Hi,
I tried to create a sample pbix file like the attached.
Please check the below picture and the attached pbix file.
Value measure: = SUM( Data[Value] )Running value per site: = IF ( ISFILTERED ( 'Calendar'[Date] ), CALCULATE ( [Value measure:], 'Calendar'[Date] <= MAX ( 'Calendar'[Date] ) ) )
FarhanAhmed
Community Champion
4 years agoYou can try following
Running Total = CALCULATE(SUM('Table (2)'[Value]), FILTER(ALLEXCEPT('Table (2)','Table (2)'[SiteId]),'Table (2)'[Date]<=SELECTEDVALUE('Table (2)'[Date])))
- Anonymous4 years agoNot applicable
Thanks FarhanAhmed, I struggled with this one a bit once I tried to get a bit fancier with some other data, but it worked for the intial tables I had.