Forum Discussion
leandroduarte
2 years agoHelper I
Total per group
Dear Colleagues, I'm trying to make a total per group using this table structure, please let me know the best way to handle it
basically I want to display for each row the total of the group and year, not individual sum per type
| Year | Group | Type | Qty | Results Expected | |
| 2024 | A | Z | 5000 | Group by A | 8200 |
| 2024 | A | Y | 3000 | Group by A | 8200 |
| 2024 | A | I | 200 | Group by A | 8200 |
| 2024 | B | I | 200 | Group by B | 200 |
| 2023 | A | Z | 5000 | Group by A | 8000 |
| 2023 | A | Y | 3000 | Group by A | 3000 |
Use this measure
Measure = CALCULATE(SUM('DataTable'[Qty]), FILTER(ALL('DataTable'), 'DataTable'[Group] = SELECTEDVALUE('DataTable'[Group]) && 'DataTable'[Year] = SELECTEDVALUE('DataTable'[Year])))Regards
Phil
1 Reply
- PhilipTreacySuper User
Use this measure
Measure = CALCULATE(SUM('DataTable'[Qty]), FILTER(ALL('DataTable'), 'DataTable'[Group] = SELECTEDVALUE('DataTable'[Group]) && 'DataTable'[Year] = SELECTEDVALUE('DataTable'[Year])))Regards
Phil