Forum Discussion
mageshraja
6 years agoFrequent Visitor
Multiple line Qty Subtraction from Single Data
Hi , Hope this would be simple doubt. But I need help to crack the solution in Power bi Have Two tables: Table 1: Same part # stock received on muliple dates / Unique Ref. Table 2: Usage of the ...
- 6 years ago
Try like new columns
Col1 = sumx(filter(table1, table1[Part #]=earlier(table1[Part #]) && table1[Unique Ref ID]<=earlier(Unique Ref ID])),table[Received Qty]) col2 = sumx(filter(table2, table1[Part #]=table2[Part #]),table2[Qty Used]) col3 = if((col2-col1)<col2,(col2-col1),col2)Appreciate your Kudos.
amitchandak
6 years agoSuper User
Try like new columns
Col1 = sumx(filter(table1, table1[Part #]=earlier(table1[Part #]) && table1[Unique Ref ID]<=earlier(Unique Ref ID])),table[Received Qty])
col2 = sumx(filter(table2, table1[Part #]=table2[Part #]),table2[Qty Used])
col3 = if((col2-col1)<col2,(col2-col1),col2)
Appreciate your Kudos.
- mageshraja6 years agoFrequent Visitor
Hi Amit,
It works. Thanks for the solution.
Regards,
Mak