Forum Discussion
Need help in optimizing DAX query
This looks fairly clean already. That said, you could try replacing your MAXX with a LOOKUPVALUE. That is,
VAR _ConversationRate =
SWITCH (
_currency,
_currencySelected, 1,
LOOKUPVALUE (
'Exchange Rates'[Exchange Rate],
'Exchange Rates'[From Currency], _currency
)
)
Can you pinpoint what part is slow? Try replacing _Onhand_StdCost, _PickedQty, and _ConversationRate with a constant (e.g. 2) one at a time to see which one(s) are slowing it down.
- Mohan1282562 years agoHelper IV
AlexisOlson thanks for the reply. Appreciate it.
I tried this earlier..but it made more complicated than earlier.
I will try to dig it out by your suggestion.
Thanks,
Mohan V.
- Mohan1282562 years agoHelper IV
When i run the both Onhand StdCost+PickedQty it took hardly 2 sec.
But then when i added the multiplication with conversionrate it is taking more time like almost 30+ sec.
I believe it is because of the switch case that i am using in here.
Not sure how can i make it quick.
Any suggestions please.Thanks
Mohan V.