Forum Discussion

LonnekedeLeeuw's avatar
LonnekedeLeeuw
Frequent Visitor
9 years ago

Count Measure category in Donut Chart

 

Hello,

 

I have a measure that calculates a yield percentage. I also have a measure that determine the %category (<80%, 80-85% ect).

I mannaged to make a column chart with a colours for each category by creating a measure for every category.

 

But I also want to show the numbre of object for each category (preferably in a donut chart).

Like this:

This chart has to change depending on the period that is selected on the page.

 

I have tried some methodes but I can't seem te get the same results as the column chart (with the example above the column chart shows a lot of grey en red and no dark green).

 

Has anyone an idea how to solve this? 
If more information is needed to help, please let me know.

 

Thanks in advance!

 

3 Replies

    • LonnekedeLeeuw's avatar
      LonnekedeLeeuw
      Frequent Visitor

      I don't know a easy way to supply sample data.

       

      I have 3 tables;

      1: Object information;     Id, address, gas_ID, heat_ID

      2: RegisterID;     gas_ID / heat_ID, address, type (gas or heat) (there is a relationship with Object info based on address)

      3: Usage;     Date, gas_ID / heat_ID, usage; also a couple of calculated columns to seperate the gas and heat usage

      Table 3 has a relationship with table 2 based on gas_ID/heat_ID

       

      In the table 3 I have the following measures:

      YieldPercentage = IFERROR( (sum(heat usages)/sum(gas usage));0)

      PercentageCategory = if(or(ISBLANK([YieldPercentage]);[Rendement%]=0);"Blank";     if([YieldPercentage]<0,80;"<80%";   if([YieldPercentage]<0,85;"80-85%";     if([YieldPercentage]<0,9;"85-90%";      if([YieldPercentage]<1;"90-100%";">100%")))))

       

      For the column chart I have the following measures:

      <80% = IFERROR(if([YieldPercentage]<0,8;[YieldPercentage];0);0)

      80-85% = IFERROR(if(and([YieldPercentage]<0,85;[YieldPercentage]>0,8);[YieldPercentage];0);0)

      85-90% = IFERROR(if(and([YieldPercentage]<0,9;[YieldPercentage]>0,85);[YieldPercentage];0);0)

      90-100% = IFERROR(if(and([YieldPercentage]<1;[YieldPercentage]>0,9);[YieldPercentage];0);0)

      >100% = IFERROR(if([YieldPercentage]>1;[YieldPercentage];0);0)

       

      I made a measure for every category so I could determine the colours of the bars.

       

      Please let me know how I can give better/more informatie without showing actual customer data