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

Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now

Reply
john_whelan
Regular Visitor

Multiply a column by another result

Hi Guys,

 

Can you help me again please? 

 

I'm trying to gain a solution to show a % result (Margin) from a Joint venture?

 

The main data currently shows FULL margin so I wanted to add in a calculation to show the 'Would Be' margin based on the allocated joint venture %. 

 

I.e. For Company A, who has a 50% Joint venture, Total Margin=£100 so Calculated Margin should be £50. 

For Company B, who has no (100%) Joint Venture, Total Margin =£100 so Calculated Margin should be £100. 

 

I have a separate data table (Joint_Venture) that lists the different companies i.e. A, B, C D.... by the would be weighting i.e. 50%, 100%,30%100%.... etc

 

I'm guessing this would involve a DAX calulation that says  Total Margin * JV% where the JV% is 'Looked up' based on the company name? 

I hope this makes sense? Any pointers would be appreciated? 

 

Many thanks in advance for your assistance? 

 

Cheers, 

 

John

1 ACCEPTED SOLUTION

@john_whelan   Try this DAX measure

 

Margin JV = SUMX('Data','Data'[Margin CTD] * RELATED('Joint_Venture'[JV]))

 

Any questions,let me know 

 

Thanks

Nishant

View solution in original post

6 REPLIES 6
v-eachen-msft
Community Support
Community Support

Hi @john_whelan ,

 

Try the following measure:

Margin AFTER JV % =
VAR a =
    SELECTEDVALUE ( 'Data'[Company] )
RETURN
    SUM ( Data[Margin CTD] )
        * LOOKUPVALUE ( 'Joint venture'[JV], 'Joint venture'[Company], a )

 

Community Support Team _ Eads
If this post helps, then please consider Accept it as the solution to help the other members find it.
john_whelan
Regular Visitor

Hi,

Hopefully these screen shots will help?

Relationship.PNGData table.PNGJV table - Percentages.PNGCurrent rersult.PNG

 

All I'm looking to do is create a second results calculation.

That will be called Margin AFTER JV %

 

so for eg. Company 210 will have a result of 50% of 2,815,855.04 so will be 1,407,927.52

 

Hope this makes sense?

@john_whelan   Try this DAX measure

 

Margin JV = SUMX('Data','Data'[Margin CTD] * RELATED('Joint_Venture'[JV]))

 

Any questions,let me know 

 

Thanks

Nishant

@Nishantjain Solution is perfect! 

 

Thanks very much!

Greg_Deckler
Super User
Super User

@john_whelan Not really enough information to go on, please first check if your issue is a common issue listed here: https://community.powerbi.com/t5/Community-Blog/Before-You-Post-Read-This/ba-p/1116882

Also, 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!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...
amitchandak
Super User
Super User

@john_whelan ,Can you share sample data and sample output in table format?

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

Helpful resources

Announcements
OCT PBI Update Carousel

Power BI Monthly Update - October 2024

Check out the October 2024 Power BI update to learn about new features.

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

October NL Carousel

Fabric Community Update - October 2024

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