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
snifer
Post Patron
Post Patron

rankx cannot compare text with numbers- calculate lowest 10 customers

i got my table with column company (text) and column revenue

i want calculate 10 lowest performer

 i trying something like that

LOWEST 10 =
var customerrank = RANKX(MASTER_INVOICE;all(MASTER_INVOICE[Company]);[TOTALREVEUEINVOICE];ASC)
return
if (customerrank <= 10;[TOTALREVEUEINVOICE]; blank())

 

but i got an error on rankx doesn't support compare the text with typer numbers. ( i tried with format and value  but nothing)

how i could fix this? or other way to calculate lowest customers?

1 ACCEPTED SOLUTION
az38
Community Champion
Community Champion

Hi @snifer 

try to take 10 in quotas, like:

return
if (customerrank <= "10";[TOTALREVEUEINVOICE]; blank())

do not hesitate to give a kudo to useful posts and mark solutions as solution

 


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

View solution in original post

1 REPLY 1
az38
Community Champion
Community Champion

Hi @snifer 

try to take 10 in quotas, like:

return
if (customerrank <= "10";[TOTALREVEUEINVOICE]; blank())

do not hesitate to give a kudo to useful posts and mark solutions as solution

 


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

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.