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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
wshanewood1
Regular Visitor

Calculation Issue

This is my first time using this site, and I am rather new to DAX. What I am trying to do seems simple, but for whatever reason, I can't get it to work out. I am trying to multiple a percentage by another percentage. For exampe I have [Cat. Grade] of 99.67, I want to multiply that by [% WEIGHTED] of 2.31%. Instead of getting .023, if am getting .99675. 

 

The formula I am using is Final Calc:=calculate([Cat. Grade]*[%WEIGHTED],filter(GRADES,[WEIGHTED]="WEIGHTED"))

 

WEIGHTEDCategoryCat. Grade%WEIGHTEDFinal Calc
UNWEIGHTEDActivity Gains82.00%  
UNWEIGHTEDActivity Losses95.00%  
UNWEIGHTEDEntitlements90.09%  
WEIGHTEDAllotments99.67%2.31%0.99675
WEIGHTEDCollections99.21%0.10%0.99211
WEIGHTEDDeductions97.97%29.79%0.97969
WEIGHTEDEvents94.43%9.19%0.94426
WEIGHTEDExtensions100.00%3.25%1.00000
WEIGHTEDHeld Pay94.00%0.03%0.94000
6 REPLIES 6
harshnathani
Community Champion
Community Champion

Hi @wshanewood1 ,

 

Please create the following measure.

 

Multiple = CALCULATE(SUMX(Table10, Table10[Cat. Grade]*Table10[%WEIGHTED]))
 
123.JPG
 
Regards,
Harsh Nathani
 
Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!!

I appreciate the help, but for whatever reason it didn't work out for me (I pasted image below). Maybe its something wrong with the other formulas I am using. 

%WEIGHTED:=([WEIGHTED TOTALN]/[TOTAL UNWEIGHTED])

      WEIGHTED TOTALN:=calculate([Total Transactions],filter(GRADES,[WEIGHTED]="WEIGHTED"))

      TOTAL UNWEIGHTED:=CALCULATE(SUM([WEIGHTED TOTAL]),ALL(Grades[Category]),ALL(Grades[PAY / PERS]))

 

Cat. Grade:=if(CONTAINS(Grades,Grades[PAY / PERS],"PERS"),[PERS CALC],[PAY CALC])

(and i have a calculation for each grade.)

 

Excel Pic.png

 

Hi @wshanewood1 ,

 

   TOTAL UNWEIGHTED:=CALCULATE(SUM([WEIGHTED TOTAL]),ALL(Grades[Category]),ALL(Grades[PAY / PERS])).

 

Not sure what do you want to calculate here.

 

Can you share your .pbix file or explain the measures you have calculated and what do they mean.

 

Regards,

Harsh Nathani

I am trying to weigh the weighted categories by the number of transactions. The more transactions, the more weight. So I need the overall transaction number. I use this formula to remove the filters for Category and PAY/PERS that is applied. I get % weight of each transaction, multiple that by each category grade, and then sum that up to give me a weighted grade for those categories. I hop that makes sense. 

 

I removed the filter fo Pay/Pers because it wasnt needed anymore. 

TOTAL UNWEIGHTED:=CALCULATE(SUM([WEIGHTED TOTAL]),ALL(Grades[Category]))

 

 

Greg_Deckler
Community Champion
Community Champion

Is what you are display source data or is it a table/matrix visualization representation of your data?

If it is a table/matrix visualization, are [Cat. Grade] and [%WEIGHTED] columns or measures. If measures, what are their formulas?


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
Greg_Deckler
Community Champion
Community Champion

Hard to be certain with the information provided. Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2.

 

 



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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