Forum Discussion
Mohan128256
2 years agoHelper IV
Need help in optimizing DAX query
Hello All, I have written below dax which is taking 30+ sec of time to execute and produce the results. _InventoryAmtConversed =
VAR _Onhand_StdCost =
CALCULATE(SUM('Inventory Snapshots'[O...
Greg_Deckler
2 years agoCommunity Champion
Mohan128256 Would love to have the PBIX for this for testing. However, you might try something like this as you are calculating the same table twice in your code:
VAR _Table = CALCULATETABLE( 'Inventory Snapshots', KEEPFILTERS('Inventory Snapshots'[Snapshot Weekly?] = "Y"), KEEPFILTERS('Calendar'[445 Year Week Offset]=0))
VAR _Onhand_StdCost = SUMX( _Table, [On-hand StdCost$])
VAR _PickedQty = SUMX( _Table, [Picked Qty])
- Mohan1282562 years agoHelper IV
Greg_Deckler thanks for your reply.
I have sent you the personal message with the report google drive link.Will be waiting for your reply with thousand open eyes. 😃
Thanks,
Mohan V.