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 a fact
id | val | round |
1 | 10 | 1 |
2 | 2 | 1 |
3 | 1 | 1 |
4 | 20 | 11 |
5 | 15 | 30 |
6 | 15 | 30 |
and I have a round Dim wich related to column round in the fact
ID | DESC | order |
1 | ROUND 1 | 1 |
11 | ROUND 2 | 2 |
30 | ROUND 3 | 3 |
I need to find sum of values in round for previous round...
the output should be like
Column1 | sum of value | Previous ROUND VALUE |
ROUND 1 | 13 | |
ROUND 2 | 20 | 13 |
ROUND 3 | 30 | 20 |
Solved! Go to Solution.
Assuming that the [order]-column can be used to identify the order of the rounds and that you have a relationship between table[round] and dimRound[ID], you can create this measure:
Value previous round = CALCULATE ( sum(Table[val])); FILTER ( ALL ( dimRound ); dimRound[order] = SELECTEDVALUE ( dimRound[order] ) - 1 ) )
thank you>>
Measure22:=CALCULATE (
SUM ( Table1[VAL] ),
FILTER (
ALL ( Table2),
Table2[order] = IF (HASONEVALUE(Table2[order] ), VALUES ( Table2[order]) - 1 )
)
)
Assuming that the [order]-column can be used to identify the order of the rounds and that you have a relationship between table[round] and dimRound[ID], you can create this measure:
Value previous round = CALCULATE ( sum(Table[val])); FILTER ( ALL ( dimRound ); dimRound[order] = SELECTEDVALUE ( dimRound[order] ) - 1 ) )
thank you>>
Measure22:=CALCULATE (
SUM ( Table1[VAL] ),
FILTER (
ALL ( Table2),
Table2[order] = IF (HASONEVALUE(Table2[order] ), VALUES ( Table2[order]) - 1 )
)
)
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 |
---|---|
111 | |
100 | |
80 | |
64 | |
57 |
User | Count |
---|---|
145 | |
111 | |
92 | |
84 | |
66 |