Skip to main content

Hi All, 

 

I have a dataset that has two ID’S ‘A’ and ‘B’.  

 

I have to create a part to whole ( donut chart) for the following criteria - 

 

   1. Based on the year (or years) selected each donut should show part to whole - 

 

         Whole - The sum of column ‘Cnt’ for both the ID’s for the year selected.  

         Part. - The sum of column ‘Cnt’ for the ID selected for the selected year.

 

In Sheet 1 the values are shown as 

 

Creating a donut chart

       

        Year is selected as 2019 ( added to context) 

         Whole - {SUM([Cnt])} 

          Part. - Sum(Cnt)   

 

 Taking ID - A

       Whole - the sum of column ‘cnt’ for ID - A and B when year =. 2019 - (33024)

       Part - the sum of column ‘cnt’ for ID - A when year =. 2019 - (31225)

 

I think I need to write a if statement to create a dimension that will have both (Part and Whole) values and which I should be bringing to color to create the donut chart.  

 

Any advise as to how to build a donut chart out of this will be helpful. I am trying to create a donut chart for each ID.  

 

Attaching the workbook and data.

 

Regards,

Rishi Saka 

2 respostas
  1. 17 de ago. de 2020, 22:45

    Hi Peter,

     

    In my case, as explained, I want the total value of the pie to be 33024 and the part should be 31225 for ID -A.

    Basically the denominator remains same for the donut charts for each of the ID's A and B for the same value of year in my case it is 2019.

     

    Regards,

    Rishi Saka

0/9000