This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreGet Fabric Certified for FREE during AI Skills Fest. This week only. Secure your voucher now.
I have a page with differnent slicers. in the example the table has been sliced with period = q3, Dealer = 107 and Participant = Client 2. the Ranking on the table works perfectly as its ranks Client 2 within group A for Dealer 107 as 2. However i need to show that 2 in a KPI card. Tried to use that measure in a KPI but it returns as 1 always.
this is the dealer Rank (in group) measure:
thanks
viral
Solved! Go to Solution.
HI everyone
Thanks for the suggestion!
i was able to figure it out with this dax:
Dealer Ranking KPI =
VAR _group = MAX('Dealer Ranking'[Participant Group])
VAR _dealer = MAX('Dealer Ranking'[Dealer])
VAR _participant = SELECTEDVALUE('Dealer Ranking'[Participant])
VAR _currentComm =
CALCULATE(
SUM('Dealer Ranking'[Commission LC - Everyone]),
'Dealer Ranking'[Participant] = _participant
)
VAR _participants =
CALCULATETABLE(
VALUES('Dealer Ranking'[Participant]),
REMOVEFILTERS('Dealer Ranking'[Participant]),
KEEPFILTERS('Dealer Ranking'[Participant Group] = _group),
'Dealer Ranking'[Dealer] = _dealer
)
VAR _withComm =
ADDCOLUMNS(
_participants,
"Comm", CALCULATE(SUM('Dealer Ranking'[Commission LC - Everyone]))
)
RETURN
RANKX(_withComm, [Comm], _currentComm, 0)
HI everyone
Thanks for the suggestion!
i was able to figure it out with this dax:
Dealer Ranking KPI =
VAR _group = MAX('Dealer Ranking'[Participant Group])
VAR _dealer = MAX('Dealer Ranking'[Dealer])
VAR _participant = SELECTEDVALUE('Dealer Ranking'[Participant])
VAR _currentComm =
CALCULATE(
SUM('Dealer Ranking'[Commission LC - Everyone]),
'Dealer Ranking'[Participant] = _participant
)
VAR _participants =
CALCULATETABLE(
VALUES('Dealer Ranking'[Participant]),
REMOVEFILTERS('Dealer Ranking'[Participant]),
KEEPFILTERS('Dealer Ranking'[Participant Group] = _group),
'Dealer Ranking'[Dealer] = _dealer
)
VAR _withComm =
ADDCOLUMNS(
_participants,
"Comm", CALCULATE(SUM('Dealer Ranking'[Commission LC - Everyone]))
)
RETURN
RANKX(_withComm, [Comm], _currentComm, 0)
Hi @ViralPatel212 ,
Thanks for reaching out to Microsoft Fabric Community.
Just checking in to see if your query is resolved and if any responses were helpful.
Otherwise, feel free to reach out for further assistance.
Also to assist better, could you share sample data or sample .pbix file without any sensitive information. You can upload your files to any cloud storage like OneDrive or GoogleDrive and paste the link here with appropriate permissions.
How to provide sample data in the Power BI Forum - Microsoft Fabric Community
Thank you.
It would be easier if you have shared an example dataset but without that I gues it has to be something like this:
Dealer Rank (Card) =
VAR _SelectedParticipant =
SELECTEDVALUE ( 'Dealer Ranking'[Participant] )
VAR _SelectedGroup =
SELECTEDVALUE ( 'Dealer Ranking'[Participant Group] )
VAR _RankTable =
ADDCOLUMNS (
CALCULATETABLE (
VALUES ( 'Dealer Ranking'[Participant] ),
ALLSELECTED ( 'Dealer Ranking'[Participant] ),
'Dealer Ranking'[Participant Group] = _SelectedGroup
),
"@Comm", CALCULATE ( [Commission 1] )
)
RETURN
COUNTROWS (
FILTER (
_RankTable,
[@Comm] > CALCULATE ( [Commission 1] )
)
) + 1
I have a page with differnent slicers. in the example the table has been sliced with period = q3, Dealer = 107 and Participant = Client 2. the Ranking on the table works perfectly as its ranks Client 2 within group A for Dealer 107 as 2. However i need to show that 2 in a KPI card. Tried to use that measure in a KPI but it returns as 1 always.
this is the dealer Rank (in group) measure:
Hi,
Please share the download link of the PBI file with your measures already written and visuals already built. Show the problem there clearly.
Hi @ViralPatel212 ,
That specific card you are refering has a filter on the specific customer?
Since you are using the ALLSELECTED it will only have impact on the participants on the query in this matrix you have Client 1 and Client 2 giving you the number 2, being on a card visual the allselected will have the number 1 since the context is different and you only get a single result.
Can you explain what is the intended purpose and how the card is setup in values and filters.
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsHello @MFelix
The KPI card shows the rank of the currently selected participant's dealer against all other participants in the same Participant Group. It answers: "How well does my dealer rank within my group?"
Card Setup:
Filters on the card:
Values:
How it should work: When a user (Client 2) views the report:
The issue is that the measure needs to evaluate "Client 2's commission vs all participants in Group A" without the Participant slicer restricting what participants are visible to the calculation.
Hi @ViralPatel212 ,
Now I understand the concept that you are trying to give so in this case I believe that what you need is to recalculate the measure in order to get the correct context for that specific user inside the page filter so in this case remove the filter context of the Client that is currently seeing the report based on it's selection.
Not sure if the Group is coming from the same table has the participant but if it's from a different table just change your calculation for the card:
Dealer Rank (in Group) CARD VISUAL =
RANK(DENSE, ALL('Dealer Ranking'[Participant]), ORDERBY([Commission 1], DESC, [Participant]))
This should return the correct number for that specific calculation.
If this does not work can you please let me know what is the relation between the Dealer and the Participation group are they part of the same table, are they in the dimension table or the fact table how is that calculating for the rank.
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em Portuguêshello @MFelix
Afraid that did not work, just returned the number 3 where it should be 2 both dealer and participants are in the same table For example Group A has got Partipant 1,2 and Group B has got Participant 3
In terms of model how is the Group related wirth the participant?
Are they part of the same table?
What does your model look like, is it possible to send a sample file of your report.
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em Portuguêsis the KPI card impacted by an independent slicers? You will need to strategically place a REMOVEFILTERS in your measure for the RANK to have an actual table to work with.
hi @lbendlin
Where would i place it?
this is what my goal is:
The KPI card shows the rank of the currently selected participant's dealer against all other participants in the same Participant Group. It answers: "How well does my dealer rank within my group?"
Card Setup:
Filters on the card:
Values:
How it should work: When a user (Client 2) views the report:
The issue is that the measure needs to evaluate "Client 2's commission vs all participants in Group A" without the Participant slicer restricting what participants are visible to the calculation.
the currently selected participant
see my edited reply. You will need to explain how you do that in the UI.
hello @lbendlin these are the slicers that i used:
i tried the dax but my card show (Blank)
The Participant slicer needs to be fed from a disconnected table.
could you share the file where you created it? as its not working for me?
thanks
Check out the May 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.