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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
H20treddr
Frequent Visitor

Quarter beginning Inventory

I am trying to measure beginning inventory for a Month or Quarter.  The difficulty is that in any given week I do not necessarilly have data (see table) so I woud like to summ across the "first reported" week.  Is there a way to do this with measures and/or DAX?  THANKS

 

  qtr 1qtr 1qtr 1qtr 1qtr 1
customer nameSKUweek 1week 2week 3week 4week 5
Customer 1SKU 11   1
 SKU 21    
 SKU 31    
 SKU 41    
Customer 2SKU1 111 
Customer 3SKU1   1 
 SKU 1   1 
 SKU 2   1 
 SKU 3   1 
Customer 4SKU 1     
Customer 5SKU 2 1 11
Customer 6SKU 31    
Customer 7SKU 3  11 
Customer 8SKU 2111  
Customer 9SKU 1     
Customer 10SKU 1 1111
       
Beginning Value for qtr 1 = Sum of red = 14      
3 REPLIES 3
AnthonyTilley
Solution Sage
Solution Sage

Do You have some Sample data.

 

I have done this before the idea is to Calculate toe sum or values for each week, find the first week and return this value. these two parts are relativly simple but it is dependent on how your data is structured in the data table.

for example if you have two colunms of Week and Qrt in your table then this complicates things as you cannot use time based functions. 

 

please add a sample data set and i can take a look for you.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Thanks Anthony - we are the more complicated 🙂 ... here is some sample data:

 

RegionReporting CustomerProduct SKUYearWeek NumberMonth NumberQtr NumberSales Quantity
Region ACustomer 1SKU 120185012442
Region ACustomer 1SKU 12018511242
Region ACustomer 1SKU 22018511241
Region ACustomer 1SKU 1201921142
Region ACustomer 1SKU 1201931141
Region ACustomer 2SKU 120194111
Region ACustomer 1SKU 1201941141
Region ACustomer 1SKU 120195111
Region ACustomer 1SKU 2201952140
Region ACustomer 2SKU 120195114
Region ACustomer 3SKU 320196211
Region ACustomer 1SKU 1201962140
Region ACustomer 1SKU 1201972140
Region ACustomer 2SKU 120197214
Region ACustomer 1SKU 1201982140
Region ACustomer 2SKU 120198218
Region ACustomer 3SKU 320199211
Region ACustomer 1SKU 1201993140
Region ACustomer 2SKU 120199213
Region BCustomer 4SKU 120199211
Region ACustomer 1SKU 12019103140
Region BCustomer 4SKU 1201910311
Region ACustomer 1SKU 12019113140
Region ACustomer 2SKU 1201911313
Region BCustomer 4SKU 1201911311
Anonymous
Not applicable

HI @H20treddr ,

You can consider to write a rolling total formula to summary multiple date periods.

DAX 101: Computing running totals in DAX

Regards,

Xiaoxin Sheng

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.