Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
43 | |
23 | |
21 | |
15 | |
15 |
User | Count |
---|---|
45 | |
31 | |
30 | |
18 | |
17 |