Forum Discussion
DAX
I've had a look at your table and isnt it supposed to check the values in the "Region" column rather than the "PartPlantbyYearWeekNum"? Like this:
R+ Order Value =
IF(
'R+ Orders'[Region] in { "EMEA", "NA"},
DIVIDE( 'Part File'[PartPlantbyYearweekNum] , 'Part File'[Exchange Rates] ),
BLANK()
)
Hope this answer solves your problem! If you need any additional help please tag me in your reply.
If my reply provided you with a solution, pleased mark it as a solution ✔️ or give it a kudoe 👍
Thanks!
Best regards,
Gonçalo Geraldes
Thank you!
I actually get the R+ order value from an other table. I have done a lookup in the above formula I have applied. And I need to apply the exchage rate, i.e., divide R+ order value(which i have got by applying lookup) by exchage rate. And I only need to apply that, i.e., divide by exchange rate for EMEA region and not NA.
- goncalogeraldes4 years agoSuper User
In that case try using the RELATED() function since it is more efficient and has a better performance than the LOOKUPVALUE(). Something like:
R+ Order Value = var _plant = RELATED('R+ Orders'[PartPlantbyYearWeekNum]) var _divide = DIVIDE( 'Part File'[PartPlantbyYearweekNum] , 'Part File'[Exchange Rates] ) return IF( _plant in { "EMEA", "NA"}, _divide, BLANK() )Hope this answer solves your problem! If you need any additional help please tag me in your reply.
If my reply provided you with a solution, pleased mark it as a solution ✔️ or give it a kudoe 👍
Thanks!
Best regards,
Gonçalo Geraldes- Anonymous4 years agoNot applicable
- goncalogeraldes4 years agoSuper User
Anonymous do you have a relationship between the to table that are being used?