Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
szymonswiezyfg
Frequent Visitor

Rankx with parameters

Hi,

I have problem with sorting table using rankx with parameters.

I use parameters table with 15x different rankx measures but when i change parameter on slicer it's always be sorting in different way. 

How can i solve this?

Example measure and table with slicers

 

szymonswiezyfg_0-1703147486648.png

 

Ranking liczby transakcji =
RANKX(
    ALLSELECTED(dane[Podmiot Nazwa]),
    [Liczba transakcji],,DESC)
1 REPLY 1
v-yifanw-msft
Community Support
Community Support

Hi @szymonswiezyfg ,

 

Based on the information you have provided, you need to provide detailed data to solve the problem. However, I can provide you with the following Measure attempt to help you solve the problem:

 

Rank =

VAR Selected =

    SELECTEDVALUE ( Parameter[Column Name], "Default Measure" )

RETURN

    SWITCH ( Selected, "Measure1", [Rank 1], "Measure2", [Rank 2],…, [Default Rank] )

 

How to Get Your Question Answered Quickly - Microsoft Fabric Community

If it does not help, please provide more details with your desired out put and pbix file without privacy information.

 

Best Regards,

Yifan Wang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.