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
K7R-RS8-04
Frequent Visitor

Filter % of total based on other columns

I have a table that I am trying to apply filters on to show a % of total for a column Account Name. I've tried various SUM, FILTER, DIVIDE expressions but the % total seems to be using the total of all Account Names vs. the few I want to filter out.  Any suggestions on the DAX formulas to help with this would be appreciated.  Thank you!PBI Capture.png

1 ACCEPTED SOLUTION
AntrikshSharma
Community Champion
Community Champion

use ALLSELECTED:

Total Quantity = CALCULATE ( [Total Quantity], ALLSELECTED ( ColumnName ) )

 

View solution in original post

4 REPLIES 4
harshnathani
Community Champion
Community Champion

HI @K7R-RS8-04 ,

 

You can try this measure for Total Percent

 

 

total _Percent =
var a = CALCULATE(Sum('Table'[Quantity]))
var b = CALCULATE(Sum('Table'[Quantity]), ALLSELECTED('Table'))

RETURN
DIVIDE(a,b)
 
 
1.jpg
 

Regards,
Harsh Nathani

Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)

 

That worked great - thank you!

AntrikshSharma
Community Champion
Community Champion

use ALLSELECTED:

Total Quantity = CALCULATE ( [Total Quantity], ALLSELECTED ( ColumnName ) )

 

That worked - 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.

Top Solution Authors