Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.

Reply
Ali_HYYS
Regular Visitor

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)
)
 

 @amitchandak 

5 REPLIES 5

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

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

@Ali_HYYS , how about merge in power query

https://radacad.com/append-vs-merge-in-power-bi-and-power-query

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Greg_Deckler
Super User
Super User

@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.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

Check out the February 2025 Power BI update to learn about new features.

Top Kudoed Authors