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
matkvaid
Helper II
Helper II

Is this possible, TOPN as matrix rows?

Hi, i am asked to do something like this - compare table. I have the measures, results are ok, but now i am also asked to make just top product comparing, i would put it in a matrix, but do not find a way how to... Any ideas is it possible?

 

 Measure1Measure2Measure3
Top10080%20%-5%
Top1050%50%-10%
Top320%80%5%
6 REPLIES 6
matkvaid
Helper II
Helper II

So if i create calculated table with TOPN, i get what i would like to, but then my calculated table does not recalculate when i apply some filters... 😄 

Still trying to find something out. If i can create calculated table, add one more columnt that just has value top100 and add to matrix, it works. So maybe it is possible with selectcolumns or something like that? I'm stugling with table functions, sorry for many stupid questions

v-xinruzhu-msft
Community Support
Community Support

Hi @matkvaid 

If you want to get the product name, you can use the TopN in the visual filter, as shown in the image below

 

vxinruzhumsft_0-1670823301757.png

 

For details, please refer to the following links:

 TOP N Filter in Power BI with Zero DAX Code; Visual Level Filter - RADACAD

However, if you want to display the Topn measure, you can't do it, because TopN returns multiple values and is a table, please refer to the following link for details

 TOPN DAX Function: How it works in Power BI? Comparison against the top group - RADACAD

Best Regards,

 

Yolo Zhu

 

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

 

Hi, yes i can add topn filter, it works 🙂 But the problem is i was aksed to show few levels of top...

Hi @matkvaid 

 

IF you want to display the topn measure like your picture displayed, it cannot, it returns a table

 

Yolo Zhu

 

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

FreemanZ
Super User
Super User

Hi 

@matkvaid 

TOPN returns a table, which is not good for such case. Try to add a index column with RANKX and another column with SWITCH. One column directly shall also be viable.

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.

Top Solution Authors