Forum Discussion

Aleksis's avatar
Aleksis
Regular Visitor
3 years ago
Solved

Stacked area chart question

Hello,

 

I would like to use the stacked area chart which shows % of documents per category per month.

I use the following fields

  • x-axis: month
  • y-axis: count of docNR
  • legend: channel (email, letter, etc.)

The issue I have is that the chart presents each channel as % of the grand total of all months, whereas I want each month to add up to 100%. See below the table to understand the difference:

So I would like to have the chart show number of documents per channel as a % but they should add to 100% per month rather than 100% per all months. As you can see below, the chart doesn't add up to 100% per month at the moment.

 

I'm not sure if this is possible to do. Please let me know if you have a solution.

Thanks in advance for your help.

  • Hi Aleksis 

     

    For this you need to create a metric that does the calculation for those specifi group try something similar to:

     

     

    Metrics % = DIVIDE ( COUNT(Table[DocNR]), CALCULATE(COUNT(Table[DocNR]), ALL(Table[Channel]))

     

    If you want to have the chart based on the selected  channels replace the formula to:

     

     

    Metrics % = DIVIDE ( COUNT(Table[DocNR]), CALCULATE(COUNT(Table[DocNR]), ALLSELECTED(Table[Channel]))

2 Replies

  • Hi Aleksis 

     

    For this you need to create a metric that does the calculation for those specifi group try something similar to:

     

     

    Metrics % = DIVIDE ( COUNT(Table[DocNR]), CALCULATE(COUNT(Table[DocNR]), ALL(Table[Channel]))

     

    If you want to have the chart based on the selected  channels replace the formula to:

     

     

    Metrics % = DIVIDE ( COUNT(Table[DocNR]), CALCULATE(COUNT(Table[DocNR]), ALLSELECTED(Table[Channel]))