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

need DAX measure to multiply qty for each row in fact table by a value in my item lookup table

I need a DAX measure to multiply qty for each row in fact table by a value in a lookup table.

Basically similar to excel using a vlookup (RELATED function hasnt worked for me in a measure)


I'd like to do this without merging the fact and dimension table.

I assume there is an easy way to do this, but I cannot figure it out.

thanks

1 ACCEPTED SOLUTION

Thanks for offering help.

 

I was able to resolved my issue with this syntax. Previously, for some reason I was not able to get RELATED to work but I ulitmately did.

 

Here was my solution:

sumx(NS_Transactions,NS_Transactions[Qty]*RELATED(NS_ITEMS[QtyMultiplier]))

View solution in original post

2 REPLIES 2
Super User IV
Super User IV

If they are related, try using RELATEDTABLE


---------------------------------------

@ me in replies or I'll lose your thread!!!

I have a NEW book! 
DAX Cookbook from Packt
Over 120 DAX Recipes!




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Thanks for offering help.

 

I was able to resolved my issue with this syntax. Previously, for some reason I was not able to get RELATED to work but I ulitmately did.

 

Here was my solution:

sumx(NS_Transactions,NS_Transactions[Qty]*RELATED(NS_ITEMS[QtyMultiplier]))

View solution in original post

Helpful resources

Announcements
secondImage

Happy New Year from Power BI

This is a must watch for a message from Power BI!

December Update

Check it Out!

Click here to read more about the December 2020 Updates!

Community Blog

Check it Out!

Click here to read the latest blog and learn more about contributing to the Power BI blog!

Get Ready for Power BI Dev Camp

Get Ready for Power BI Dev Camp

Mark your calendars and join us for our next Power BI Dev Camp!.

Top Solution Authors
Top Kudoed Authors