Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Donut Chart / pie chart

Hi Team, 

I need to implement the following  

 

Product  Value     Quantity 

p1          2355        45 

p3         23424       43

p4        14000        20

p6         35252        65

p2          534535      123 

p5         24324        43

p7       1233            34

p8       5222             75

p9       4574            456

p10     12055       34

p11    45643            34

p12    5477          10

 

 

and so on... 

 

in the donut bar, i need to show top5 products (based on the value) total vs  rest.  

 

attached the image. 

 

 

not sure how to implement it... please help me 

 

fyi: 

i have implemented top 5 products and its giving the correct value.. although not sure how to implement in donut  chart... 

 

 

Top 5 SKUS =
var rankingcontext =VALUES(Query1[Product])
return
CALCULATE([Total Inv],
TOPN(5,ALL(Query1[Product]),[Total Inv]),
rankingcontext)

 

  Thanks in advance 

 

  • Anonymous's avatar
    Anonymous
    7 years ago

    I resolved it. 

     

    Created two measures, one which give value for 5 products and other which gives value for rest products and added it to the donut chart. 

6 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Anonymous ,

     

    When you put your fields in the donut chart (Product under "Legend" and Value under "Values"), under the Filters tab -> Visual Level Filters, click on the dropdown arrow for "Product", change the filter type from "Basic filtering" to "Top N". There, you can choose to display Top X number of products you want.

    • Anonymous's avatar
      Anonymous
      Not applicable

      I know about the visual level filters and selecting top 5  products. But this is not what i want. 

       

      your solution will display the top 5 products in the donut chart. 

       

      As i mentioned, 

      within the Donut chart, there should be two displays,

      one --> shows the total of top 5 products

      other --> shows total of rest products 

       

      please let me know if this can be implemented

       

      • Anonymous's avatar
        Anonymous
        Not applicable

        Hi Anonymous 

         

        Sorry I misread your question.

         

        What you can do is:

        1. Create the donut chart
        2. Since the donut chart is sorted descending, on your keyboard, hit and hold Ctrl. Select the top 5 products in the donut chart (in this case the top 5 that takes up the most space).
        3. Once all 5 are selected, right click on it, and click Group.

        Once you've done that, it will group the top 5 as one category, and the others as another category.