Forum Discussion
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.
ADDCOLUMNS(test, "Rank", countrows(FILTER (TEST,[Paid_Amount]>=EARLIER([PAID_AMOUNT]) )
- Anonymous6 years ago
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.
- Anonymous6 years ago
Hi @Narayana3635 ,
https://drive.google.com/file/d/1Ys6MLP74cF_L_16i3lPFSe5CZDubZX6g/view?usp=sharing
Regards,
Harsh NathaniDid I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)
13 Replies
- az38Community Champion
Hi Anonymous
try a measure
Measure rankx = RANKX( ALL('Fact_Claim_Base_Vw'[Name]), CALCULATE(SUM('Fact_Claim_Base_Vw'[Paid Amount])) )- AnonymousNot 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.
- amitchandakSuper User
Anonymous ,
For Rank Refer these links
https://radacad.com/how-to-use-rankx-in-dax-part-2-of-3-calculated-measures
https://radacad.com/how-to-use-rankx-in-dax-part-1-of-3-calculated-columns
https://radacad.com/how-to-use-rankx-in-dax-part-3-of-3-the-finale
https://community.powerbi.com/t5/Community-Blog/Dynamic-TopN-made-easy-with-What-If-Parameter/ba-p/367415- AnonymousNot 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.
- AnonymousNot applicable
Hi Anonymous ,
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 NathaniDid I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)
- AnonymousNot 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.
- az38Community 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