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
sushantj
Frequent Visitor

Having problems in Percentage of Grand total in a Clustered Column Chart

Hello All, 

 

I want to extract data from google sheet and create a chart (which i already have done, please see the screenshot for the same). 

 

The bars show the count of something for a particular month. The screenshot 1 shows the data for the month of May and June. 

 

The problem is - The percentage as shown in the screenshot is according to the grand total of both the months (May and June). I want to show the monthly data. As in the blue bar in the month of May should be the percentage of count of things according to the grand total of June and not according to the grand total of both May and June. 

 

Note: If i filter out the month of May, then only the data for the month of June is considered (See screenshot 2 for the same). But i want to show the data for both the months together. 

 

 

Please help me with this.

 

 

 

Screenshot 1.jpgScreenshot 2.jpgs

 

 

1 ACCEPTED SOLUTION
v-qiuyu-msft
Community Support
Community Support

Hi @sushantj,

 

You can create a measure like below:

 

Measure = DIVIDE(COUNTROWS('Table1'),CALCULATE(COUNTROWS('Table1'),FILTER(ALL(Table1),MONTH('Table1'[Date])=MONTH(MAX('Table1'[Date])))))

 

a2.PNG

 

Best Regards,
Qiuyun Yu

Community Support Team _ Qiuyun Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
v-qiuyu-msft
Community Support
Community Support

Hi @sushantj,

 

You can create a measure like below:

 

Measure = DIVIDE(COUNTROWS('Table1'),CALCULATE(COUNTROWS('Table1'),FILTER(ALL(Table1),MONTH('Table1'[Date])=MONTH(MAX('Table1'[Date])))))

 

a2.PNG

 

Best Regards,
Qiuyun Yu

Community Support Team _ Qiuyun Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @v-qiuyu-msft,

 

Found the solution and understood the formula for the measure. 

 

Thanks a lot for your help.

 

Regards,

Sushant Jadhav

Hi @v-qiuyu-msft,

 

I have two questions on this,

 

1) I am not getting percentage sign besides the numbers, did you do something else to make that happen?

 

2) Can you explain how the formula in the measure works? I am having a hard time understanding it!

 

Regards,

Sushant Jadhav

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.