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

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.

Reply
unnijoy
Post Partisan
Post Partisan

Ranking

Hi Team,

 

I have to create a Table visual that will show Rank based on csat. Csat am calculating by using a measure. I need to create a RankX measure that will dynamicaly show the Rank. One table shouls show the Rank based on country,Other based on Manager and the other based on City. Currently am using the below measure

RANKX(ALLSELECTED('CSAT Dump'[Country]) ,[6_Curr_Csat%],,DESC,Dense)
 
The issue with the above one is that for each table i have to create it seperatly. One for country,other for Manager like that. how can i create a dax which will work dynamically.
7 REPLIES 7
lbendlin
Super User
Super User

Evaluate the use of ISFILTERED or ISINSCOPE.  Also consider using Calculation Groups.

Its not working.

Hi @unnijoy,

Can you please share a pbix or some dummy data with raw data structure and expected results? It should help us clarify your scenario and test to coding formula.

How to Get Your Question Answered Quickly  

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Hi @v-shex-msft ,

Below is the raw data format.

Raw DataRaw Data

Csat formula is Count of 1&2/ Total count of csat

Eg: Manger Leo =3/4=75%

Now what we need is that a dynamic rank formula.

 

So when we can us it in table for any visual.

Currently am using the below formula 

RANKX(ALLSELECTED('CSAT Dump'[Manager]) ,[Csat%],,DESC,Dense)
 
but this is not dynamic. If i need to show county wise csat% then i have to change 'CSAT Dump'[Manager] to 'CSAT Dump'[Country].
 
How can i make this Dynamic.

HI @unnijoy,

>>Csat formula is Count of 1&2/ Total count of csat

I'm not so clear about this, can you please share the csat expressions?

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Hi @v-shex-msft ,

The Csat will range from 1 -4. We will consider 1 and 2 as Csat. Rest we won;t consider. So if the csat is 1 or 2 will consider rest are like Dsat. csat %= count of (1or 2)/ Total count(1-4)

 

Hi @unnijoy,

Perhaps you can try to add a variable with summarize function to aggregate your records based on category and ranking on the variable table, then you can use the current category value to lookup correspond ranking values.

All the secrets of SUMMARIZE - SQLBI

Using the SELECTEDVALUE function in DAX - SQLBI

DAX - The Many Faces of VALUES() | P3 Adaptive

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.