March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
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)
)
@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/3...
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
Hi @Ali_HYYS,
AFAIK, current power bi does not support creating dynamic calculated column/tables based on filter/slicer. They are work on different data levels and not able to re-calculated/interact with filter/slicer selections on data view.
If you mean to get static top values based on current categories from other tables, it is possible. You can add a variable table into the calculated column to lookup correspond records, then you can apply filters on this variable table to get the specific record as a result display on your calculated column.
Please provide some dummy data if you still confused about the coding formula.
Regards,
Xiaoxin Sheng
@Ali_HYYS , how about merge in power query
https://radacad.com/append-vs-merge-in-power-bi-and-power-query
@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.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
User | Count |
---|---|
90 | |
89 | |
85 | |
73 | |
49 |
User | Count |
---|---|
169 | |
144 | |
90 | |
70 | |
58 |