The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
I have a very challenging problem right now with one of my Measures.
I am trying to determine from historical inventory and the value of goods in a warehouse. However, I only have the stock movements of the items available for this. These contain the quantity and only for positive stock movements the current purchase price at the time of the movement.
With my formula I can determine the stocks and prices at the respective time. In the visual of a table these are even correct on the level of the variant / the article. But the total of the table is not correct at the end and the total value of goods is not correct?
Inventory Value =
VAR MaxIdWithNonZeroPrice =
MAXX(
FILTER(
StockMovement,
StockMovement[stockMovementPurchasePrice] <> 0
),
StockMovement[stockMovementId]
)
VAR Quantity =
CALCULATE(
SUMX(
StockMovement,
StockMovement[stockMovementQuantity]
)
)
VAR PurchasePrice =
CALCULATE(
MAX(StockMovement[stockMovementPurchasePrice]),
FILTER(
StockMovement,
StockMovement[stockMovementId] = MaxIdWithNonZeroPrice
)
)
RETURN
CALCULATE(Quantity * PurchasePrice)
Solved! Go to Solution.
Hi @v-xinruzhu-msft ,
thank you so much for your reply!
Yesterday I found a solution for my problem. I could solve it this way:
https://community.fabric.microsoft.com/t5/Desktop/Total-Sum-of-Measure/m-p/3078214
Thank you very much!
Hi @v-xinruzhu-msft ,
thank you so much for your reply!
Yesterday I found a solution for my problem. I could solve it this way:
https://community.fabric.microsoft.com/t5/Desktop/Total-Sum-of-Measure/m-p/3078214
Thank you very much!
Hi @FrauLehmann
You can create a new measure
e.g Measure=SUMX(VALUES(StockMovement[StockMovementId]),[Inventory Value])
Then put the measure to the visual.
Best Regards!
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the August 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
113 | |
80 | |
77 | |
46 | |
40 |
User | Count |
---|---|
149 | |
115 | |
67 | |
64 | |
58 |