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
MichelleR
Frequent Visitor

Formula help

Hi everyone! If I am writing to you it is because after two days of searching on the internet for a solution, I finally realized am well beyond my depth with the issue I am about to present to you. Pleeeease help!

 

Here is the data structure I have in Power Query:

 

Criteria N1Criteria N2Criteria N3Criteria N4Criteria N5Evaluation resultOverall Score
FinancialAAAAAAAAAA52
FinancialAAAAAAAAAB41
FinancialAAAAAAABBC55
FinancialAAAAAAABBD15
FinancialAAAAAAABBE54
FinancialAAAAAAABBF52
FinancialAAAAAAACCG41
FinancialAAAABBBCCH52
FinancialBBBBBBBCCI44
FinancialBBBBBBBCCJ41
PerformanceBBBBBBBDDK23
PerformanceBBBBBBBDDL53


Now I would like to calculate the following:

Weight (%) = Evaluation result / Sum of the evaluation results for each criteria N3 group
example for the first line of the data I gave it would be = 5 (the evaluation result for Criteria N5 A) / 29 ( the sum of all the Criteria N3 AAA entries)

 

Then, I need to calculate

Weight = Weight (%) * Evaluation Result

 

And finally

Score = Weight * Overall Score

 

My issues are:
- Would I be better off with a measure or a calculated column?
- Can you please tell me what formula i need to write to make those calculations?
Thank you in advance!

1 ACCEPTED SOLUTION
Jihwan_Kim
Super User
Super User

Hi, @MichelleR 

In my opinion, please try Calculated Measures.

Please also check the link down below, that is the sample pbix file.

 

Weight % =
DIVIDE (
SUM ( 'Table'[Evaluation result] ),
CALCULATE (
SUM ( 'Table'[Evaluation result] ),
ALLEXCEPT ( 'Table', 'Table'[Criteria N3] )
)
)
 
weight = [Weight %] * SUM('Table'[Evaluation result])
 
Score = SUM('Table'[Overall Score]) * [weight]
 
Picture10.png
 

Hi, My name is Jihwan Kim.

If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Go to My LinkedIn Page


View solution in original post

2 REPLIES 2
Jihwan_Kim
Super User
Super User

Hi, @MichelleR 

In my opinion, please try Calculated Measures.

Please also check the link down below, that is the sample pbix file.

 

Weight % =
DIVIDE (
SUM ( 'Table'[Evaluation result] ),
CALCULATE (
SUM ( 'Table'[Evaluation result] ),
ALLEXCEPT ( 'Table', 'Table'[Criteria N3] )
)
)
 
weight = [Weight %] * SUM('Table'[Evaluation result])
 
Score = SUM('Table'[Overall Score]) * [weight]
 
Picture10.png
 

Hi, My name is Jihwan Kim.

If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Go to My LinkedIn Page


amitchandak
Super User
Super User

@MichelleR , As new measure

Weight (%) =

divide(sum([Evaluation result]), sumx(filter(allselected(Table), Table[Criteria N3] = max(Table[Criteria N3])),[Evaluation result]))

 

New column

Weight (%) =

divide(([Evaluation result]), sumx(filter(allselected(Table), Table[Criteria N3] = earlier(Table[Criteria N3])),[Evaluation result]))

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.