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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

How can I avoid looping over weeks?

Hello.

 

I need to calculate future inventory for next week ( C4:F4 in my example)

 

Inventory_next_week = (Inventory_actual + Scheduled_Production_Next_Week) - Demand_Next weekmrp.png

 

Do I need to loop over the weeks to calculate it?

 

BR,

SKS

3 REPLIES 3
Greg_Deckler
Community Champion
Community Champion

@Anonymous - Is that how your source data is organized? If so you will likely need to unpivot your week columns.

 

 



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

Hello @Greg_Deckler 

 

My data are ogranized into 3 different tables:

2020-10-26 15_22_34-Book1 - Excel.png

Hi @Anonymous ,

Combined with picture1 and picture2, how could the dataset be look like in power bi? Because picrture1 looks like a combined table but picture2 shows 3 different table. So which table you want to get the expected result? Could you please consider sharing the data table constructure in power bi?

 

Best Regards,

Yingjie Li

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors