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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
v-shex-msft
Community Support
Community Support

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

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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