Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
Hello,
I am trying to write a loop that will give me a running total on submissions grouped on ID / Quarter. The below table is the base table I have:
The desired output would ideally look like this:
The dax I wrote does not give me my desired outcome and I am unsure of how I should approach this. Please see below for my dax and the output it is giving me.
Appreciate any help anyone can provide! Thanks!
Solved! Go to Solution.
@Mactoff Try this:
SubmittedConsistency =
VAR __MaxQuarter = MAX('Table'[Quarter])
VAR __ID = MAX('Table'[ID])
VAR __Table = FILTER(ALL('Table'), [ID] = __ID && [Quarter] <= __MaxQuarter)
VAR __Result = SUMX(__Table,[Submitted])
RETURN
__Result
Based on this: Better Running Total - Microsoft Power BI Community
@Mactoff Try this:
SubmittedConsistency =
VAR __MaxQuarter = MAX('Table'[Quarter])
VAR __ID = MAX('Table'[ID])
VAR __Table = FILTER(ALL('Table'), [ID] = __ID && [Quarter] <= __MaxQuarter)
VAR __Result = SUMX(__Table,[Submitted])
RETURN
__Result
Based on this: Better Running Total - Microsoft Power BI Community
You're a legend, thank you!
| User | Count |
|---|---|
| 52 | |
| 35 | |
| 22 | |
| 17 | |
| 17 |
| User | Count |
|---|---|
| 69 | |
| 58 | |
| 39 | |
| 21 | |
| 21 |