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

% of total by category

I'm trying to display a % of total for each category, however I can't get it to work. 

_% of Total measure is showing 100% for all... I tried to extract the part where the formula would need to return 493 for every row, regardless of category, however all my data is still filtered. How do I get the formula to work?

0ZVw4fQ

 

Here's what I have so far:

_% of Total = DISTINCTCOUNT('Billing Stats'[WO#]) / CALCULATE(DISTINCTCOUNT('Billing Stats'[WO#]),ALL('Billing Stats'[WO#]))
1 ACCEPTED SOLUTION

@Anonymous

 

try this here

 

Snap.PNG

 

View solution in original post

7 REPLIES 7
chethan
Resolver III
Resolver III

@Anonymous

 

use the below DAX for %

 

Total % = 
		DIVIDE(
			CALCULATE(
				SUM('Producer'[Value])
				) , 
			CALCULATE(
					SUM(Producer[Value]),
					ALL('Producer')
					)
				)

attached Sample here

Anonymous
Not applicable

It's still showing 1 for each entry. BI seems to be ignoring the ALL() function.

_% of Total = DIVIDE(
	DISTINCTCOUNT('Billing Stats'[WO#]), 
	CALCULATE(
		DISTINCTCOUNT('Billing Stats'[WO#]),
		ALL('Billing Stats'[WO#])
	)
)

@Anonymous

 

Please share sample file, so it very useful to understand.

 

 

regards,

Chetan K

 

 

Anonymous
Not applicable

@Anonymous

 

try this here

 

Snap.PNG

 

Anonymous
Not applicable

How did you get the values to display as %? Calclulation is invalid, percentages should add up to 100%. Here's what Excel comes up with:

Row LabelsNYGrand TotalNY
Aug     
burnsl1152124127620.74%25.15%
ferraiol61326587811.04%53.75%
garcong144833148126.07%6.69%
kingd34590.07%1.01%
maielloe233766240342.07%13.39%
stoleare1 10.02%0.00%
Aug Total55554936048  

Hi,

 

I get the correct result.  Download the workbook from here.

 

Untitled.png


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

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.