Forum Discussion

SebSchoon1's avatar
SebSchoon1
Icon for Post Patron rankPost Patron
3 years ago

Modeling problem i think for on hand Stock

Hi guys,

 

I have some difficulites to work with historical data and updated data.

 

here a picture of my model with some arrows, 

 

 

My objective is to work with Historical data [COLLECTION HISTORIQUE] from my fact table

to calculate the On and stock , based on this formula 

 

 

Images de stock = CALCULATE(SUMX('Lignes de mouvement (img stock)',
'Lignes de mouvement (img stock)'[QUANTITE]),
'Calendrier'[Date]<=max('Calendrier'[Date]))

which works perfectly well With the [COLLECTION] Values from my dimension table "Base Article"

 

since there is a link on Unique product ID, (called [CLEF_UNIQUE_ARTICLE])

 

to my "Lignes de mouvement"  FACT TABLE

and  "Lignes de mouvement (img stock)" Fact table created based on "Lignes de mouvement' table in power Query

 

i did this to reduce drastically the time to calculate on hand stock.

 

I would like to have the On-Hand Stock but based on the historical collection.

 

How can i do this?

 

Thanks guys for any information you are the boss

 

 

No RepliesBe the first to reply