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, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
Orstenpowers
Post Patron
Post Patron

Multiply values from one table and another

Dear all,

I need to multiply the values from the three columns "AMOUNT_GROUP", "Faktor für x-Leiter" and "Multiplier". I assume this is quite easy to solve, but obviously I am too stupid...

 

powerbi001.JPG

 

powerbi002.JPG

 

I hope someone out there can help me...

7 REPLIES 7
v-yajiewan-msft
Community Support
Community Support

Hi @Orstenpowers, hello parry2k and DataNinja777, thank you for your prompt reply!

 

Is there any progress on this issue?

 

If you find any answer is helpful to you, please remember to accept it.

 

It will help others who meet the similar question in this forum.

 

Thank you for your understanding.

  

parry2k
Super User
Super User

@Orstenpowers if you have all these columns in a the same table, just add new column using following DAX expression:

 

New Column = Table[Col 1] * Table[Col 2] * Table[Col 3]

 

Although it is recommended to add calculated columns in the PQ. 



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

@parry2k !

Thank you very much for your proposal, but unfortunately the data are not in the same table.

 

Sales Statistic Group (full) is coming from ST_PRODUCT_GROUP

AMOUNT_GROUP is coming from BILLING_DATA

Faktor für x-Leiter and Multiplier are coming from ETSI_Multipliers

 

powerbi004.jpg

 

I also had hoped that I would only need to multiply these three values, but it did not work out...

Do you have any idea what I need to do?

Hi @Orstenpowers , hello parry2k and DataNinja777, thank you for your prompt reply!

 

Is there a relationship between these three tables?

 

If so, use similar syntax for your requirements:

CalculatedAmount = 
SUMX (
    ST_PRODUCT_GROUP,
    BILLING_DATA[AMOUNT_GROUP] *
    RELATED(ETSI_Multipliers[Faktor für x-Leiter]) *
    RELATED(ETSI_Multipliers[Multiplier])
)

 

If false, we need to manually search for the relevant value using LOOKUPVALUE(Note,here is the sample code):

CalculatedAmount = 
BILLING_DATA[AMOUNT_GROUP] *
LOOKUPVALUE(
    ETSI_Multipliers[Faktor für x-Leiter],
    ETSI_Multipliers[Sales Statistic Group (full)], ST_PRODUCT_GROUP[Sales Statistic Group (full)]
) *
LOOKUPVALUE(
    ETSI_Multipliers[Multiplier],
    ETSI_Multipliers[Sales Statistic Group (full)], ST_PRODUCT_GROUP[Sales Statistic Group (full)]
)

More information for your reference:

RELATED function (DAX) - DAX | Microsoft Learn

LOOKUPVALUE function (DAX) - DAX | Microsoft Learn 

 

Best regards,

Joyce

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

DataNinja777
Super User
Super User

Hi @Orstenpowers ,

 

My recommendation is to create explicit measures rather than relying on implicit ones, as this will allow you to multiply those measures more effectively. The three columns from the two different fact tables seem to be filtered by a common dimension table, which is applied in the row context of your table visual. By using explicit measures, the multiplication will be correctly filtered by the same row context.

 

Best regards,

 

parry2k
Super User
Super User

@Orstenpowers do you want add a measure or a column? Also, all these multipliers are columns or measures?



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Hi and Thanks for your feedback!

All multipliers are columns.

 

You are asking whether I prefer measure or column as solution?! Actually I do not know the Pro's and Con's of both...it just needs to work. 🙂

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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