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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.