Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hello...
I have table employee
which have
| ID | VALUE | ROUND |
| 1 | 10 | 1 |
| 2 | 10 | 1 |
| 3 | 10 | 1 |
| 4 | 20 | 2 |
| 5 | 30 | 2 |
| 6 | 20 | 3 |
| 7 | 20 | 3 |
| 8 | 20 | 3 |
and round table which have
| ROUND |
| 1 |
| 2 |
| 3 |
how to write dax eqaution to sum values for previous round
eg. output
| ROUND | sum | prev sum |
| 1 | 30 | |
| 2 | 50 | 30 |
| 3 | 60 | 50 |
Hi @Anonymous
Measure =
CALCULATE (
SUM ( Table1[VALUE] ),
FILTER (
ALL ( Table1[Round] ),
Table1[Round] = ( SELECTEDVALUE ( Table1[Round] ) - 1 )
)
)
Please mark the question solved when done and consider giving kudos if posts are helpful.
Cheers ![]()
thank you for responding...
but ssas doesn't support the function
SELECTEDVALUE
is there any work around ?
Measure =
CALCULATE (
SUM ( Table1[VALUE] ),
FILTER (
ALL ( Table1[Round] ),
Table1[Round] = IF ( HASONEVALUE ( Table1[Round] ), VALUES ( Table1[Round] ) - 1 )
)
)
Please mark the question solved when done and consider giving kudos if posts are helpful.
Cheers ![]()
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 14 | |
| 7 | |
| 4 | |
| 4 | |
| 3 |
| User | Count |
|---|---|
| 25 | |
| 10 | |
| 10 | |
| 6 | |
| 6 |