Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Hello.
Does anyone know what i have to do to saw in 1 sinlge bar chart the top 10 and the bottom 10 customers by revenue measure?
Thank you.
Solved! Go to Solution.
I think the easiest way is to summarize the the revenues, create a list by customer, and add a basic filter ( top 10) on the visualization ( right side where the visualizations are), and a new list with bottom 10
Yes but you will have 2 different visual.I need to have 1 single visual with the top 10 and the bottom 10.Your way has to be with 2 different.
thank you
Here is an example of how to do this. In my case, I only had 6 products, so did Top/Bottom 2 only, but the pattern is the same. This is a table, but if you use the adapted measures in a bar chart, only the top/bottom will show.
Top Bottom 2 =
VAR Top2 =
TOPN ( 2, ALLSELECTED ( 'Product'[Product] ), [Total Sales], DESC )
VAR Bottom2 =
TOPN ( 2, ALLSELECTED ( 'Product'[Product] ), [Total Sales], ASC )
RETURN
CALCULATE ( [Total Sales], KEEPFILTERS ( UNION ( Top2, Bottom2 ) ) )
Pat
Hello.
Thanks for the reply but this not work properly. In the visual i dont any data for the bottom "10". I ve got only for the top "10". i have tried it in a table and in bar chart and nothing.
You didn't use the whole expression from the example. Please try this measure.
Top N Sum Sales =
VAR Top10 =
TOPN ( 10, ALLSELECTED ( 'DimCustomer'[Name] ), [Revenue], DESC )
VAR Bottom10 =
TOPN ( 10, ALLSELECTED ( 'DimCustomer'[Name] ), [Revenue], ASC )
RETURN
CALCULATE ( [Revenue], KEEPFILTERS ( UNION ( Top10, Bottom10 ) ) )
Pat
I used the whole expression and didnt work for the bottom 10.
User | Count |
---|---|
16 | |
14 | |
13 | |
12 | |
11 |
User | Count |
---|---|
19 | |
16 | |
15 | |
11 | |
9 |