Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
I have set up a report that required that i link 5 tables. Each table is responsible for an inventory count.
Main table is item, that all tables are related to
the problem is that i need to calculate what is available to be sold
to accomplis this i am using the follwing formula in excel
(inventory_qty + po_qty) - (Prod_qty + Sales_Qty) = Available_Qty.
how can i perform this calculatin in Power BI. using BI desktop.
Hi @Frankcf,
Based on my understanding, I build below sample, you can refer to it:
Tables.(t1,t2,t3,t4)
Table formula:
Avible Inventory =
SELECTCOLUMNS(Sheet1,"Inventroy ID",[Inventroy ID],"Inventory Name",[Inventory Name],
"Avible Qty",([Inventroy Qty]+ SUMX(FILTER(ALL(Sheet2),Sheet2[Inventory ID]=EARLIER(Sheet1[Inventroy ID])),[PO_Qty]))
-(SUMX(FILTER(ALL(Sheet3),Sheet3[Inventory ID]=EARLIER(Sheet1[Inventroy ID])),Sheet3[Prod_Qty])+SUMX(FILTER(ALL(Sheet4),Sheet4[Inventory ID]=EARLIER(Sheet1[Inventroy ID])),Sheet4[Sales_Qty])))
The detail result table:
Avible Inventory =
SELECTCOLUMNS(Sheet1,"Inventroy ID",[Inventroy ID],"Inventory Name",[Inventory Name],
"Avible Qty",([Inventroy Qty]+ SUMX(FILTER(ALL(Sheet2),Sheet2[Inventory ID]=EARLIER(Sheet1[Inventroy ID])),[PO_Qty]))
-(SUMX(FILTER(ALL(Sheet3),Sheet3[Inventory ID]=EARLIER(Sheet1[Inventroy ID])),Sheet3[Prod_Qty])+SUMX(FILTER(ALL(Sheet4),Sheet4[Inventory ID]=EARLIER(Sheet1[Inventroy ID])),Sheet4[Sales_Qty])),
"Qty_T1",Sheet1[Inventroy Qty],
"Qty_T2",SUMX(FILTER(ALL(Sheet2),Sheet2[Inventory ID]=EARLIER(Sheet1[Inventroy ID])),Sheet2[PO_Qty]),
"Qty_T3",SUMX(FILTER(ALL(Sheet3),Sheet3[Inventory ID]=EARLIER(Sheet1[Inventroy ID])),Sheet3[Prod_Qty]),
"Qty_T4",SUMX(FILTER(ALL(Sheet4),Sheet4[Inventory ID]=EARLIER(Sheet1[Inventroy ID])),Sheet4[Sales_Qty]))
Result:
Regards,
Xiaoxin Sheng
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
106 | |
94 | |
77 | |
65 | |
53 |
User | Count |
---|---|
147 | |
106 | |
104 | |
87 | |
61 |