Forum Discussion
Inventory position
Hi All,
I am stuck with something that is probably very simple. I am trying to calculate an inventory position.
Here is a simplified dataset with 2 tables : a fact table corresponding to stock moves with a move date and an inventory position and a calendar table. I have created a one-to-many ralationship between the two dates field.
My objective is to use the calendar date to have an inventory position even when there is no movement. The calculation has to propagate the last inventory in the following days until there is a new value.
In the attached pbix, on the left there are 1 table and 1 graph where I used the date from the calendar table to display the results and it does not work. On the right, I used the move date and of course it works. Now I would like to understand why I can't use the date from my calendar to get the same result. Is it an issue with the relation between the 2 tables or is it my DAX formula which is wrong?
You help would be much appreciated.
Thanks in advance
2 Replies
- v-chuncz-msft
Community Support
- Arnault_
Resolver III
Hi v-chuncz-msft ,
Thanks for your help. Following your recommendation I changed date/time type to time type and it works now. If I understand well the problem, DAX considers these are two different types and that's why the relation between my calendar table and my fact table was not working. I wasn't expected that.
Many thanks for your help.