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
aucklanduser
Helper I
Helper I

RankX issue converting to text with filters

Having an issue with RankX and filters. I have ranked my branches by margin %, then made a measure including a unichar and the value difference between Rank and Rank LM. The issue I have is when filters are applied to the table (as seen below), the rank and rank last month calculate correctly but when I put into a formula to get the Unichar arrow ('value' & " " & Unichar(9650)), the number is not showing correctly (see line one of the second table, showing as 1 with down arrow not 2 with down arrow). Rank minus rank LM is still calculating correct, when put into a formula with text it spits out an incorrect number when filtered.

 

Any ideas or happened before?

 

RankX issueRankX issueimage.png

1 ACCEPTED SOLUTION

@aucklanduser change ALL to ALLSELECTED



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.

View solution in original post

7 REPLIES 7
aucklanduser
Helper I
Helper I

Thanks for your help Parry, played around with filters and arrived at an acceptable solution

aucklanduser
Helper I
Helper I

I'm thinking I can get around it by using summarised tables but I think I am going to end up doing this for at least 4 probably more categories so would prefer to keep it in measures

@aucklanduser change ALL to ALLSELECTED



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.

So it looks like the all selected is working (as the rank change new is the Rank this month minus Rank last month) however when I filter national sales out, something weird happens with Christchurch when filters are applied which makes me think that the all selected isnt working

 

image.pngimage.png

Thanks Parry, this solved my Filter statement which has now been removed, problem is still there unfortunately

parry2k
Super User
Super User

@aucklanduser can you share what your rank and other measures are ? 



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.

Measures below;

This month rank = RANKX(filter(ALL(BranchTable[branch]),BranchTable[Branch] <> "National sales"),[MTDGroupMargin%])

Last month rank = RANKX(filter(ALL(BranchTable[branch]),BranchTable[Branch] <> "National sales"),[MTDGroupMargin% LM])

Rank change calc = ([This month rank] - [Last month rank])*-1

Rank Change =
switch(
    true(),
    [Rank change calc] > 0, UNICHAR(9650) & " " & [Rank change calc],
    [Rank change calc] < 0, UNICHAR(9660) & " " & -[Rank change calc],
    [Rank change calc] = 0, "-"
)

 

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.