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

Top Solution Authors