Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreThe FabCon + SQLCon recap series starts April 14th at 8am Pacific. If you’re tracking where AI is going inside Fabric, this first session is a can't miss. Register now
Dear All,
I have made Three Meaures and Rank Table where I enter the rank column value as 3 5 10 to use the Slicer as a top 3 to Top 10 Based on the Slicer selection, but when i select 3 it is showing 5 values as shown in the mention below image.
Rank Selection:
Solved! Go to Solution.
Hello @mohammedkhan
You can skip the ranking and use TOPN with your ranking measure to get your TOPN games. It would look something like this.
Top N Game Income =
VAR _Ranks =
SELECTEDVALUE ( Ranks[Rank] )
VAR _RankingContext =
VALUES ( 'Game Income'[Games] )
RETURN
CALCULATE (
[Total Game Income],
TOPN ( _Ranks, ALL ( 'Game Income'[Games] ), [Total Game Income] ),
_RankingContext
)
Take a look at this video for more information on the example.
The problem you are running into is your ALL ( 'Games Income' ) is bringing the whole table, not just all the games. What you want is this.
Game Rank =
IF (
NOT ISINSCOPE ( 'Game Income'[Games] ), BLANK(),
RANKX ( ALL ( 'Game Income'[Games] ), [Total Game Income] )
)
And if you want the rank only on the TopN games you can use this.
TopN Game Rank =
IF (
ISBLANK ( [Top N Game Income] ) || NOT ISINSCOPE ( 'Game Income'[Games] ), BLANK(),
RANKX ( ALL ( 'Game Income'[Games] ), [Top N Game Income] )
)
Hello @mohammedkhan
You can skip the ranking and use TOPN with your ranking measure to get your TOPN games. It would look something like this.
Top N Game Income =
VAR _Ranks =
SELECTEDVALUE ( Ranks[Rank] )
VAR _RankingContext =
VALUES ( 'Game Income'[Games] )
RETURN
CALCULATE (
[Total Game Income],
TOPN ( _Ranks, ALL ( 'Game Income'[Games] ), [Total Game Income] ),
_RankingContext
)
Take a look at this video for more information on the example.
Hi @jdbuchanan71 Could you please help on the Ranking as well, i would like to bring the Ranking accoridng to the Game Income but it is ranking absurd like
firsst three games are 1 then 2
Game 1 Rank1
Game 2 Rank1
Game 3 Rank1
Game 4 Rank2
where is should be like
Game 1 Rank 1
Game 2 Rank 2
Game 3 Rank 3
Game 4 Rank 4
You can also see that into that same image where the ranking for first three games is 1
The problem you are running into is your ALL ( 'Games Income' ) is bringing the whole table, not just all the games. What you want is this.
Game Rank =
IF (
NOT ISINSCOPE ( 'Game Income'[Games] ), BLANK(),
RANKX ( ALL ( 'Game Income'[Games] ), [Total Game Income] )
)
And if you want the rank only on the TopN games you can use this.
TopN Game Rank =
IF (
ISBLANK ( [Top N Game Income] ) || NOT ISINSCOPE ( 'Game Income'[Games] ), BLANK(),
RANKX ( ALL ( 'Game Income'[Games] ), [Top N Game Income] )
)
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 52 | |
| 44 | |
| 44 | |
| 20 | |
| 19 |
| User | Count |
|---|---|
| 71 | |
| 70 | |
| 34 | |
| 33 | |
| 31 |