Forum Discussion
Inventory risk based on expiry dates
- 1 year ago
Hi GGerritsen ,
Thank you for being a part of Microsoft Fabric Community Forum!Thanks so much for sharing all the details. At this point, since we’ve explored a lot of possibilities and the issue seems to go a bit deeper, I think the best next step would be to raise a support ticket with Microsoft. That way, the support team can take a closer look with the right tools and internal access.
To raise a support ticket for Fabric and Power BI, kindly follow the steps outlined in the following guide:
How to create a Fabric and Power BI Support ticket - Power BI | Microsoft Learn
If this post helps, please give us Kudos and consider marking it Accept as solution to assist other members in finding it more easily.
Regards,
Menaka Kota.
Hi GGerritsen ,
Once try these
cumulative forecast measure:
Cumulative Fcst :=
CALCULATE(
SUM(Forecast[Fcst]),
FILTER(
ALL('Date'),
'Date'[Date] <= MAX('Date'[Date])
)
)
Create a calculated table to simulate forecast consumption by expiry:
InventoryRisk =
VAR LotTable =
ADDCOLUMNS(
Inventory,
"FcstUntilExpiry",
CALCULATE(
SUM(Forecast[Fcst]),
FILTER(
Forecast,
Forecast[Item] = EARLIER(Inventory[Item]) &&
Forecast[Date] <= Inventory[Expiry Date]
)
)
)
RETURN
ADDCOLUMNS(
LotTable,
"RiskQty", [Qty] - [FcstUntilExpiry]
)
Getting stuck at the error "The expression refers to multiple columns. Multiple columns cannot be converted to a scalar value."
- GGerritsen1 year ago
Helper I
Good morning, I will log the ticket and post the results here to keep everything together, once it has been resolved I will mark solution as Accept
- v-menakakota1 year ago
Community Support
Hi GGerritsen ,
Your DAX will return a table with multi columns, it couldn't be a measure.
Therefore you need to use this expression on (Create new table)
If this post was helpful, please give us Kudos and consider marking Accept as solution to assist other members in finding it more easily.
- v-menakakota1 year ago
Community Support
Hi GGerritsen ,
May I ask if you have resolved this issue? If so, please mark the helpful reply and accept it as the solution. This will be helpful for other community members who have similar problems to solve it faster.
Thank you.
- GGerritsen1 year ago
Helper I
hello, sorry, Friday was a travel day, was out of office and working from a different plant last week, just catching up on everything and will work at this again during the week.
G.
- GGerritsen1 year ago
Helper I
Moved it into it's own table, here are the results
for the lot expiring August 04, current inventory 6,174 units
Cumulative forecast between now and August 04 3,329 units
My expected result would have been risk of 6174-3329 = 2845 units
The second lot 2142 units
forecast between Augsut 04 anbd Sept 02 = 3,994 - 3,329 = 665 units
Risk for second lot is 2,142 units - 665 sales = 1,477 units risk.
I'm sure I am doing something wrong that is giving me the different numbers, just can't find where it goes off.
G.
- v-menakakota1 year ago
Community Support
Hi GGerritsen ,
Thank you for being a part of Microsoft Fabric Community Forum!Thanks so much for sharing all the details. At this point, since we’ve explored a lot of possibilities and the issue seems to go a bit deeper, I think the best next step would be to raise a support ticket with Microsoft. That way, the support team can take a closer look with the right tools and internal access.
To raise a support ticket for Fabric and Power BI, kindly follow the steps outlined in the following guide:
How to create a Fabric and Power BI Support ticket - Power BI | Microsoft Learn
If this post helps, please give us Kudos and consider marking it Accept as solution to assist other members in finding it more easily.
Regards,
Menaka Kota.
- v-menakakota1 year ago
Community Support
Hi GGerritsen ,
We are following up once again regarding your query. Could you please confirm if the issue has been resolved through the support ticket with Microsoft?
If the issue has been resolved, we kindly request you to share the resolution or key insights here to help others in the community. If we don’t hear back, we’ll go ahead and close this thread.
Should you need further assistance in the future, we encourage you to reach out via the Microsoft Fabric Community Forum and create a new thread. We’ll be happy to help.
Thank you for your understanding and participation.