The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hi,
I have used rankx to calculate rank but it is showing incorrect values for some of the filter values.
Currently, I have selected the provider name as Newman in the card and used the following code to calculate the rank
Rank = RANKX(ALL('All subjects'[provider name]), [Average Positvity Measure (%)], , DESC)
Incorrect values shown
Correct value shown for different slicer
Solved! Go to Solution.
@gautampruthi thanks for sharing the pbix file, for now use this measure using new RANK function, when I get a chance I will explain why RANKX is not working:
Rank =
RANK (
DENSE,
ALL ( 'All subjects'[Provider name] ),
ORDERBY ( [Average Positvity Measure (%)], DESC )
)
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
@gautampruthi thanks for sharing the pbix file, for now use this measure using new RANK function, when I get a chance I will explain why RANKX is not working:
Rank =
RANK (
DENSE,
ALL ( 'All subjects'[Provider name] ),
ORDERBY ( [Average Positvity Measure (%)], DESC )
)
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
@gautampruthi can you share pbix file? Remove sensitive information before sharing, you can share using one drive/google drive.
👉 Learn Power BI and Fabric - subscribe to our YT channel - @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤️
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
Hi @parry2k here is the link of the sample pbi file https://drive.google.com/file/d/15ZU27h3LGuNI6QAg1_fdX3PxoZAoISCa/view?usp=sharing
For some filters applied, it works fine, but for others, it does nott, The Values in Line chart are correct. for example if you select mode as registered it will show rank as 8 in visual (which is filtered to Newman) but in line chart its 7 which is correct
thanks for your time and help.
@Ashish_Mathur I don't think that is the case here because the RANK measure is using the ALL function, either there is something to do with the data model or something to do with the measure used in the RANK.
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
Hi,
I don't think you will get any meaningful result of a RANKX() measure in a card visual simply because there is no row context in a card visual. I could be wrong on this but having tried to solve a similar problem, i have always spectacularly failed.
very hard to tell what is going on? What is the expression for this measure?
[Average Positvity Measure (%)]
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
@parry2k this is the expression for measure
Average Positivity % = AVERAGE('TableName'[Positivity Measure])
@Ashish_Mathur is there any workaround for this.
thanks for the help
Hi,
You may not need a workaround. @parry2k may have a proper solution.