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
Anonymous
Not applicable

Show Percentages per month

Can someone assist me with a DAX / or the correct approach if I want to show the percentages per month in a line chart? 

 

The problem I am facing is that it divides the percentage within the whole timeframe selected, instead I want each month to be 100% and show me the different types within that month summing up to 100%. 

 

Please see screenshot of an example data and the current problem I am facing in the line chart. 

 

DataDataResultResult

 

Axis: Month-Year

Legend: Type

Values: Total

 

Thanks in advance.

1 ACCEPTED SOLUTION
MFelix
Super User
Super User

Hi @Anonymous ,

 

Selected the Stacked area chart and the use the following measure on your values:

 

Total total for Month-Year = 
SUM('Table'[Total]) / CALCULATE(SUM('Table'[Total]);ALL('Table'[Type]))

If you want the measure to calculated based on a filter of type you can redo the measure to:

 

Total total for Month-Year selected = 
SUM('Table'[Total]) / CALCULATE(SUM('Table'[Total]);ALLSELECTED('Table'[Type]))

Regards,

MFelix


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

3 REPLIES 3
MFelix
Super User
Super User

Hi @Anonymous ,

 

Selected the Stacked area chart and the use the following measure on your values:

 

Total total for Month-Year = 
SUM('Table'[Total]) / CALCULATE(SUM('Table'[Total]);ALL('Table'[Type]))

If you want the measure to calculated based on a filter of type you can redo the measure to:

 

Total total for Month-Year selected = 
SUM('Table'[Total]) / CALCULATE(SUM('Table'[Total]);ALLSELECTED('Table'[Type]))

Regards,

MFelix


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



Anonymous
Not applicable

@MFelix 

 

My data is little different, I tried modifying the DAX but the Acual % is showing Acutal 100% for itself which is not correct. 

 

My data looks something like this, Planned is coming from one table and Actual from other which i have connected over date table.

Actual &.jpg

 

'll be ploting % values on weekend dates and by months Bins on Clustered column chart, or in table showing % work done that Weekend date or on the Month bin date.

 

Like here for example , In Sept Total Planned = 57 , Total Actual = 59  .So Total effort = (59/57)*100 = 103% work and for the month of Sept actual % = 47%. I am having difficulty preparing DAX for that.

Also for Running total, I just used the running total Quick measure for Planned , But for Actual, since it is dividing by itself by End of Sept running total is showing 100% where as it should be 47.58%

Anonymous
Not applicable

Appreciate it @MFelix , it worked perfectly!

 

Thanks,

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.