Hi All,
I m fresh to BI, I have a problem with delta calculation from a column.
I have a maeasure to calculate the count for every rank.
Can some one help to calculate the delta from next row score.
Thanks in advance
Rank | Count | Score | Delta |
1 | 2416 | 244 | 76(=244-168) |
2 | 1870 | 168 | 43 |
3 | 1826 | 125 | 23 |
4 | 1667 | 102 | 21 |
5 | 1609 | 81 | 52 |
6 | 1080 | 29 | 8 |
7 | 939 | 21 |
Solved! Go to Solution.
@KiranGupta15, you may want to adjust the measurement this way
Delta =
VAR __next_rank = MAX ( 'Table'[Rank] ) + 1
VAR __next_score =
CALCULATE (
[Score],
'Table'[Rank] = __next_rank,
ALL ( 'Table' )
)
RETURN
IF ( NOT ISBLANK ( __next_score ), [Score] - __next_score )
Could you tell me if your problem has been solved? If it is, kindly Accept it as the solution. More people will benefit from it. Or you are still confused about it, please provide me with more details about your problem or share me with your pbix file from your Onedrive for Business.
Best Regards,
Rico Zhou
Hi, @KiranGupta15 , you might try this measure
Delta =
VAR __next_rank = MAX ( 'Table'[Rank] ) + 1
VAR __next_score =
CALCULATE (
MAX ( 'Table'[Score] ),
'Table'[Rank] = __next_rank,
ALL ( 'Table' )
)
RETURN
IF ( NOT ISBLANK ( __next_score ), MAX ( 'Table'[Score] ) - __next_score )
Thanks sir....
My "Score" is a Measure, not a column in table.
"Column 'Score' in table 'Table' cannot be found or may not be used in this expression."
This is the error message ...:
@KiranGupta15, you may want to adjust the measurement this way
Delta =
VAR __next_rank = MAX ( 'Table'[Rank] ) + 1
VAR __next_score =
CALCULATE (
[Score],
'Table'[Rank] = __next_rank,
ALL ( 'Table' )
)
RETURN
IF ( NOT ISBLANK ( __next_score ), [Score] - __next_score )
Join us for an in-depth look at the new Power BI features and capabilities at the free Microsoft Business Applications Launch Event.
User | Count |
---|---|
436 | |
147 | |
120 | |
51 | |
49 |
User | Count |
---|---|
449 | |
132 | |
122 | |
80 | |
71 |