Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Aleksis
Regular Visitor

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:

Aleksis_0-1668770547056.png

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.

Aleksis_1-1668770733820.png

 

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.

1 ACCEPTED SOLUTION
MFelix
Super User
Super User

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]))

Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



View solution in original post

2 REPLIES 2
MFelix
Super User
Super User

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]))

Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



Hello @MFelix ,

Indeed, this works perfectly. Thank you!

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.