Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Hello,
I have a problem with a cyclic reference trying to calculate the stock of a final inspection process.
*Day stock is the result of Production - Scrap - Wharehouse entry + Initial Stock
*If an inventory is loaded, that day Initial Stock = Inventory. If not, Previous day stock is needed
That leads to a cyclic reference I can't avoid.
Day Stock =Production - Scrap - Wharehouse entry + Previous day (Production - Scrap - Wharehouse entry + Previous second day (Production - Scrap - Wharehouse entry + Previous third day ... and so on)
How can I solve it?
Here is some sample data,
Thanks.
Ramiro Diz
Hi RamiroDiz,
I think it is hard to calculate cycle reference in DAX. You need to create many measures for the previous day's value and the meausre will be beased on context, so it is hrad to get previous day's value(I complete a part of this). You might need to achieve this in other tools, then use this in PowerBI. Or you could try to ask other super users in forum for help.
Best Regards,
Zoe Zhi
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi,
It's not posible to create infinite measures to get the value im wishing because I don't know how many days will pass since the last inventory.
Thats why I'm trying to generate a calculated column that brings the previous Day Stock if Inventory is empty. But I'm not able to get what I need.
Thanks for the answer,
Ramiro
Check out the September 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
110 | |
102 | |
99 | |
38 | |
37 |
User | Count |
---|---|
158 | |
125 | |
76 | |
74 | |
63 |