Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
SebSchoon1
Post Patron
Post Patron

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, 

 

SebSchoon1_0-1682979818396.png

 

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

 

 

0 REPLIES 0

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.