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
Amaan
New Member

Need Help with MEASURE

I have a few columns of a product table that I need to put in a measure. The columns are revenue, profit and margin. 
What I need is a measure that can help me assign certain weightage to each of these columns. 
For eg, - I need weightages of Revenue to be 40%, Profit be 25% and Margin be 35%. 
This way for every product that I select from the product name slicer, the measure gives me a number that is calculated from these 40,30,30 percentages. 
So if product 1 is selected, and it has revenue as 100, profit as 10 and margin as 30, so it should convert them into respective weightages and give me a final number.

 

I hope I am clear enough in my query. Pardon me for my unclear language if any, as I am only a 1-month user of power BI.

1 ACCEPTED SOLUTION
v-yinliw-msft
Community Support
Community Support

Hi @Amaan ,

 

You can try this method:

I assume the percentage is 40%,25%,35%.

Here is my sample data:

vyinliwmsft_0-1667813985968.png

 

New measure:

FinalNumber = SELECTEDVALUE('Table'[revenue]) * 0.4 + SELECTEDVALUE('Table'[profit]) * 0.25 + SELECTEDVALUE('Table'[margin]) * 0.35

 

The result is :

vyinliwmsft_1-1667814027564.png

Is this what you expect?

Hope this helps you.

Here is my PBIX file.

 

Best Regards,

Community Support Team _Yinliw

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

2 REPLIES 2
v-yinliw-msft
Community Support
Community Support

Hi @Amaan ,

 

You can try this method:

I assume the percentage is 40%,25%,35%.

Here is my sample data:

vyinliwmsft_0-1667813985968.png

 

New measure:

FinalNumber = SELECTEDVALUE('Table'[revenue]) * 0.4 + SELECTEDVALUE('Table'[profit]) * 0.25 + SELECTEDVALUE('Table'[margin]) * 0.35

 

The result is :

vyinliwmsft_1-1667814027564.png

Is this what you expect?

Hope this helps you.

Here is my PBIX file.

 

Best Regards,

Community Support Team _Yinliw

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

Greg_Deckler
Super User
Super User

@Amaan See if this helps: Better Weighted Average per Category - Microsoft Power BI Community

and the video:


@ 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!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

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.