I want to calculat the IN and OUT of my stock for 1 week.
I have already try that but it's more complicated than we think.
For exemple I have this table:
|Article||Name article||Week In||Week out|
In this case I want to count all OUT in 2023-03 week and all IN in 2023-03 week. After that I want to calcule CURRENT measure which equals the sum of all IN <= current week less than the sum of all OUT <= current week.
If we take the 2023-01 week we obtain: 5 IN & 1 OUT so CURRENT = 4.
I hope than someone can help me because I block on this problem and I don't find a solution.
I have add 2 date column in Data table and that is a sample of Date table :
and this is DAX code :
They have week IN and date IN in my fact table I have modified this table to match with my problem. They have two temporal dimension in this table because I must have the Date IN for have the Week IN and the Date OUT for the Week OUT.
The Date IN column are link with my Date table but I don't know if it's good to link with this column ?
oh yes, it is much better than having to link via the week number. You always want to link at the lowest possible granularity level to avoid M:M relationships.
Check out the November 2023 Power BI update to learn about new features.
Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.
130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.