Forum Discussion
Top N value with multiple Columns from different tables.
Hi All,
I am starting a dashboard in Power BI in in which i have a requirement of a report with a Top N Customer with Complain number and some other columns from other tables.i have done with a single column but how to do it with other please guide.
var Rankin_fdim =values('Details(Prod)'[Name])
var ranking_select = [v_Ranking_Select]
return
CALCULATE( [Premium],
FILTER(Rankin_fdim,
RANKX(ALL('Details(Prod)'[Name]),[Premium],,desc)<=ranking_select)
)
5 Replies
- Greg_DecklerCommunity Champion
Ali_HYYS - Difficult to say, this may help: https://community.powerbi.com/t5/Quick-Measures-Gallery/To-Bleep-with-RANKX/m-p/1042520#M452
Otherwise, Not really enough information to go on, please first check if your issue is a common issue listed here: https://community.powerbi.com/t5/Community-Blog/Before-You-Post-Read-This/ba-p/1116882
Also, please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2. - amitchandakSuper User
Ali_HYYS , Can you share sample data and sample output in table format? I do not see multiple columns used.
For Rank Refer these links
https://www.sqlbi.com/articles/filtering-the-top-3-products-for-each-category-in-power-bi/
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- Ali_HYYSRegular Visitor
Current:
Customer Name Premium
AGN 2343
ERP 3455
ERT 76575
WER 45633
Expected:
Region and Branch against customer coming from other tables.
Customer Name Premium Region Branch
AGN 2343 Swiss AA
ERP 3455 Newzeland BB
ERT 76575 Poertland CC
WER 45633 Swiss DD- amitchandakSuper User
Ali_HYYS , how about merge in power query
https://radacad.com/append-vs-merge-in-power-bi-and-power-query