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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Anonymous
Not applicable

Rank Based on Multiple Columns Coming From Multiple Tables

Hi Friends,

 

I am troubling in filtering table result based on mutiple columns which are coming from multiple tables. For an exmaple below is the sample matrix visual.

Product NamePlantCustomerShort qty
A1C1455
A2C1343
B3C2545
B4C3534
C1C1665
C2C3332
D3C2543
D4C1566

 

Columns "Product Name", "Plant", "Customer" are all coming from different tables.

 

Now i need to filter this matrix visual based on Short Qty i.e. Top 3

 

Product NamePlantCustomerShort qty
C1C1665
D4C1566
B3C2545

 

Please help me here with measure or any other trick.

 

@amitchauhan @gregdorval @amitchandak @JihwanKim @Jihwan_Kim @ChandeepChhabra @Mynda @Greg_Deckler 

1 ACCEPTED SOLUTION
v-chenwuz-msft
Community Support
Community Support

Hi @Anonymous ,

 

A method, use the Top N filter type in Filter Pane to get the result you want. Please follow the steps.

1 Drag the field [Short qty] to the filter pane, choose 'Top N', enter 3 after "Top" under the show items.

2 Drag the [Short qty] again to the box under "By value", select "sum" or other aggregation you want via the arrow icon.

Refer this screenshot.

vchenwuzmsft_0-1648103005127.png

Result:

vchenwuzmsft_1-1648103042593.png

 

Best Regards

Community Support Team _ chenwu zhu

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

 

 

View solution in original post

3 REPLIES 3
v-chenwuz-msft
Community Support
Community Support

Hi @Anonymous ,

 

A method, use the Top N filter type in Filter Pane to get the result you want. Please follow the steps.

1 Drag the field [Short qty] to the filter pane, choose 'Top N', enter 3 after "Top" under the show items.

2 Drag the [Short qty] again to the box under "By value", select "sum" or other aggregation you want via the arrow icon.

Refer this screenshot.

vchenwuzmsft_0-1648103005127.png

Result:

vchenwuzmsft_1-1648103042593.png

 

Best Regards

Community Support Team _ chenwu zhu

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

 

 

Jihwan_Kim
Super User
Super User

Hi,

I am not sure how your data mode looks like, but please check the below picture and the attached pbix file.

 

Picture1.png

 

Qty total: =
SUM ( Data[Qty] )

 

Qty top3: = 
CALCULATE (
    [Qty total:],
    KEEPFILTERS ( TOPN ( 3, ALL ( Data ), [Qty total:], DESC ) )
)

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Go to My LinkedIn Page


amitchandak
Super User
Super User

@Anonymous , create rank like

rankx(summarize(allselected(Table), Table[Product Name],Table[Plant],Table[Customer]), calculate(sum(Table[Short Qty])),,desc,dense)

 

and use the visual level filter of rank <=3

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.