cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Reply
nicoenz
Helper I
Helper I

Top N by value

Hi everyone, 

I have a table with four columns (supplier, quantity, revenue, cost).

With this table i created a visual that uses a switch to show quantity/revenue/cost by supplier. 

Since the number of suppliers is huge i would like to filter the top 15 suppliers based on the field i selected in the switch (if i select quantity i would like to have the top 15 suppliers based on quantity)

Currently what i do is: In the "Supplier" filter in the "Filters on this visual" section i select TopN and then I need to put a "By value".

I can't make all this work.

 

Any suggestions?

thanks in advance!!!

nico

1 ACCEPTED SOLUTION

Hi @nicoenz if you have a lot of rows, I suggest you to create separate table to get lower number of rows so this newly created table is source  for your visual.

In addition, TOPN is specific function "TOPN does not guarantee any sort order for the results." this could be the reason for your result and motivation to creat shorter table.

https://dax.guide/topn/ 

 

some_bih_0-1692627475201.png

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!






View solution in original post

4 REPLIES 4
nicoenz
Helper I
Helper I

this is what i have"

The visual: each column is a region, each colour is a supplier

nicoenz_0-1692624451032.png

 

 

The switcher with which i select to change the report in the visual (quantity or value). This selects which column to sum

nicoenz_1-1692624571505.png

 

This is the filter. When i put the measure switcher I get the "First of..." (which shouln'd be)

nicoenz_2-1692625147812.png

 

and if I apply the filter it doesn't do anything to the chart

 

Hi @nicoenz if you have a lot of rows, I suggest you to create separate table to get lower number of rows so this newly created table is source  for your visual.

In addition, TOPN is specific function "TOPN does not guarantee any sort order for the results." this could be the reason for your result and motivation to creat shorter table.

https://dax.guide/topn/ 

 

some_bih_0-1692627475201.png

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!






nicoenz
Helper I
Helper I

hi @some_bih ,

in the visual i only sum all the values. I don't use any topn expression. I was just summing all the values in the column and using the filter in the Filters pane

some_bih
Super User
Super User

Hi @nicoenz create dedicated calculated table based on your TOPN expression. This way you will limit number of rows to evaluate for visuals.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!






Helpful resources

Announcements
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors