Forum Discussion
Mohan128256
Helper IV
2 years agoNeed 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
Community Champion
2 years agoMohan128256 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 ago
Helper 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.