cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
mrcss23
Frequent Visitor

PRODUCT and VLOOKUP in DAX power bi

Hi. I have imported two tables in power BI.

Table 1 has values for several employes.

Table 2 has a rate for each employee.

I would like to SUM the result of product VALUE (table 1)* Rspective RATE (table 2).

In Excel I use PRODUCT and VLOOKUP,

The final result should be total of that column (126, 91 in the example below)

 

What should be the DAX in POWER BI?

Thank you!

Captura de ecrã 2022-09-22 183152.png

1 ACCEPTED SOLUTION
mrcss23
Frequent Visitor

I just found a way!!!
 
Result = SUMX('Table 1','Tavle1'[VALUE]*RELATED('Table 2'[Rate]))

View solution in original post

3 REPLIES 3
mrcss23
Frequent Visitor

I just found a way!!!
 
Result = SUMX('Table 1','Tavle1'[VALUE]*RELATED('Table 2'[Rate]))
Greg_Deckler
Super User
Super User

@mrcss23 There is an equivalent PRODUCT function in DAX, although you can just use *. Also there is PRODUCTX. For VLOOKUP either use LOOKUPVALUE or MAXX(FILTER(...),...)


@ 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!:
Mastering Power BI 2nd Edition

DAX is easy, CALCULATE makes DAX hard...

I know the fuctions but I am not being able to achieve the result. Any suggestion?

Helpful resources

Announcements
November 2022 Update

Check it Out!

Click here to read more about the November 2022 updates!

Power BI Dev Camp Session 27

Ted's Dev Camp

This session walks through creating a new Azure AD B2C tenant and configuring it with user flows and custom policies.

Health and Life Sciences Power BI User Group

Health and Life Sciences Power BI User Group

Power BI specialists at Microsoft have created a community user group where customers in the provider, payor, pharma, health solutions, and life science industries can collaborate.