Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
KristyP
Helper I
Helper I

Percentage of total as DAX

Hi,

 

I am in need of some assistance. I have tried several different ways of doing this. Basically I need percentage of total that can be used in further DAX. What the data looks like is below.

KristyP_0-1687849039898.png

 

1 ACCEPTED SOLUTION

Hi, @KristyP 

 

You can try the following methods.

Measure%1 = 
Var _N1=CALCULATE(SUM('Usage'[2022 Achievable Revenue]),ALLEXCEPT('Usage','Usage'[Customer]))
Var _N2=CALCULATE(SUM('Usage'[2022 Achievable Revenue]),ALL('Usage'))
Return
DIVIDE(_N1,_N2)
Measure%2 = 
Var _N1=CALCULATE(SUM('Usage'[2022 Achievable Revenue]),ALLEXCEPT('Usage','Usage'[Customer],'Usage'[Product Group]))
Var _N2=CALCULATE(SUM('Usage'[2022 Achievable Revenue]),ALL('Usage'))
Return
DIVIDE(_N1,_N2)

vzhangti_0-1688020013419.png

Is there an output that you expect?

 

Best Regards,

Community Support Team _Charlotte

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

4 REPLIES 4
KristyP
Helper I
Helper I

Thank you, a minor tweek and I got the result I was after.

v-zhangti
Community Support
Community Support

Hi, @KristyP 

 

Based on the data you have provided, what kind of output do you expect? Examples can be given.

 

Best Regards,

Community Support Team _Charlotte

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

The measure produced needs to be a percentage, this percentage will then need to be applied to a column in the sales dataset.

 

The percantage can be of grand total. Or it can be calculated per customer.

Hi, @KristyP 

 

You can try the following methods.

Measure%1 = 
Var _N1=CALCULATE(SUM('Usage'[2022 Achievable Revenue]),ALLEXCEPT('Usage','Usage'[Customer]))
Var _N2=CALCULATE(SUM('Usage'[2022 Achievable Revenue]),ALL('Usage'))
Return
DIVIDE(_N1,_N2)
Measure%2 = 
Var _N1=CALCULATE(SUM('Usage'[2022 Achievable Revenue]),ALLEXCEPT('Usage','Usage'[Customer],'Usage'[Product Group]))
Var _N2=CALCULATE(SUM('Usage'[2022 Achievable Revenue]),ALL('Usage'))
Return
DIVIDE(_N1,_N2)

vzhangti_0-1688020013419.png

Is there an output that you expect?

 

Best Regards,

Community Support Team _Charlotte

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.