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
Anonymous
Not applicable

Duplicate Ranks

Hi Please find the sample pbix file and Expected output. Here i want to show Top 50 providers on rank wise while sorting the paid amount. Here am using table visual with diffrent dimenssons and Facts.

Note: Here my orginal source is tabular model so i can't create index column so we need to apply dax to show ranks top 50 records(like need to add incremental column) , i have already filtered out Top 50 records just i want show one column for Ranks.

Rankx = RANKX(ALL('Fact_Claim_Base_Vw'),[Paid Amount],,DESC,Dense)-- it's showing duplicate records.
Here am using another measure to show one column for ranks, this is working fine in tabular database level but not working on Power Bi.
evaluate
ADDCOLUMNS(test, "Rank", countrows(FILTER (TEST,[Paid_Amount]>=EARLIER([PAID_AMOUNT]) )
))
2 ACCEPTED SOLUTIONS
Anonymous
Not applicable

Hi Harsh Thanks for giving reply, Iam using same query which you sent but Still it's displaying duplicates ranks. I undestand might be you are using Network Licence[ Network Licence key] column but orginal report i amNot  using any key column, and it should be  Network Licence[Network Licence Number]. While am using this column am getting error. Please suggest me how Can i get the Ranks.

 

 

View solution in original post

 

Hi @Narayana3635 ,

 

 

https://drive.google.com/file/d/1Ys6MLP74cF_L_16i3lPFSe5CZDubZX6g/view?usp=sharing

 

 

Regards,
Harsh Nathani

Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)

View solution in original post

13 REPLIES 13
harshnathani
Community Champion
Community Champion

Hi @Anonymous ,

 

1.jpg

 

 

 

Create the below measures.

 

paid Amount1 = CALCULATE(SUM(Fact_Claim_Base_Vw[Paid Original Amount]),FILTER(Provider, Provider[SCD_LATEST_FLG] = TRUE()))
 
 
 
 
Rankx =
IF (
NOT (
ISBLANK ( [paid Amount1] )
),
 
RANKX(
FILTER (
SUMMARIZE (
ALL ( Fact_Claim_Base_Vw ),
Fact_Claim_Base_Vw[DOS_NETWORK_LICENSE_KEY],
Provider[Name],
Provider[PROVIDER_GID],
'Network License'[NETWORK_LICENSE_KEY]
),
'Network License'[NETWORK_LICENSE_KEY] = Fact_Claim_Base_Vw[DOS_NETWORK_LICENSE_KEY]
),
[paid Amount1]
)
)
 

 

Regards,
Harsh Nathani

Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)

Anonymous
Not applicable

Hi Harsh Thanks for giving reply, Iam using same query which you sent but Still it's displaying duplicates ranks. I undestand might be you are using Network Licence[ Network Licence key] column but orginal report i amNot  using any key column, and it should be  Network Licence[Network Licence Number]. While am using this column am getting error. Please suggest me how Can i get the Ranks.

 

 

Hi @Anonymous ,

 

 

1.jpg

 

 

 

Rankx =
IF (
NOT (
ISBLANK ( [paid Amount1] )
),
 
RANKX(
FILTER (
SUMMARIZE (
ALL ( Fact_Claim_Base_Vw ),
Fact_Claim_Base_Vw[DOS_NETWORK_LICENSE_KEY],
Provider[Name],
Provider[PROVIDER_GID],
'Network License'[NETWORK_LICENSE_KEY],
'Network License'[NETWORK_LICENSE_NUMBER]
),
'Network License'[NETWORK_LICENSE_KEY] = Fact_Claim_Base_Vw[DOS_NETWORK_LICENSE_KEY]
),
[paid Amount1]
)
)
 
 
Regards,
Harsh Nathani

Regards,
Harsh Nathani

Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)

 

 

 

Hi @Anonymous ,

 

 

https://drive.google.com/file/d/1Ys6MLP74cF_L_16i3lPFSe5CZDubZX6g/view?usp=sharing

 

 

Regards,
Harsh Nathani

Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)

 

Anonymous
Not applicable

Hi Harshat, This is working fine but when we have parameter selection the data is not filtered can you please help me.

@Anonymous ,

 

What parameter are you selecting ?

 

Regards,

HN

 

Hi @Narayana3635 ,

 

 

https://drive.google.com/file/d/1Ys6MLP74cF_L_16i3lPFSe5CZDubZX6g/view?usp=sharing

 

 

Regards,
Harsh Nathani

Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)

Anonymous
Not applicable

Thnka Harsh, You Made by day. It's time to kudos to you.

az38
Community Champion
Community Champion

Hi @Anonymous 

I don't like your SUMMARIZE() statement  https://docs.microsoft.com/en-us/dax/summarize-function-dax

it has to contains of "name" argument, I don't see it on the screenshot 

 


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

Hi amit, I gone through the links still i didn't find the my exact solution. If you are able to help me please find the sample data and expected output on my orginal post.

az38
Community Champion
Community Champion

Hi @Anonymous 

try a measure

Measure rankx = 
RANKX(
ALL('Fact_Claim_Base_Vw'[Name]), 
CALCULATE(SUM('Fact_Claim_Base_Vw'[Paid Amount])) 
)

 


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

Hi Please refer the attached pbix file, what ever the solution you given it wont work becacuse name came from different table. I tried all the possible ways and seeking help.

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.