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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
FrenchConnectio
Regular Visitor

Inventory forecast based on user input

Hi all,

 

I am working on an inventory forecasting model, where the user can select from the regions and stores which items they want to forecast. The data I have looks like this:

 

table_1.PNG

 

I put that data into two selectors on my dashboard, like this:

 

selector_1.PNG

 And the user can select the items. Separately, I have data on inventory and sales levels for those items in a parent-child hierarchy, though that data is not always up to date. A sample of that data is below. Note that this is only a sample, I have inventory and sales data for every region-store-category-item combo for the dates from January 1st - January 7th.

 

inv_sales_2.PNG

 

What I am trying to output is table with a column showing the summed inventory based on the user selection. If the data ends before today, then the rest of the days should show the last reported number. For example, with those following user selection:

 

2nd_select.PNG

The table should look like this: 

 

inv_ex_21.PNG

The index column comes from the formula Index = Generateseries(-7,7,1) and the date is Date = Today()+Index.

My Inventory column is the sum of the inventory on that particular day for North->Alpha->Pants->Shorts + North->Alpha->Shirts->Long Sleeve. The issue I am running into is that my inventory formula is not working. I have:

Forecast_INV_2 = IF(
            AND(HASONEFILTER(Table[Region]),
                HASONEFILTER(Inventory[Category])
                ),
                    CALCULATE(
                       SUM('Table'[INVENTORY]),
                         FILTER(
                            ALL('Inventory'),
                                'Inventory'[Category]=SELECTEDVALUE(Table[Category]) && 
                                'Table'[Region] = SELECTEDVALUE(Table[Region])
                                )
                              )
                      ,0)

 

Once I have the inventory calculation working, then I will fill in the 0 with a formula to use the last reported number, and create another column that does the same for sales. However, I haven't been able to get this formula to work, and any advice would be appreciated.

3 REPLIES 3
aj1973
Community Champion
Community Champion

Hi @FrenchConnectio 

Your issue doesn't seem clear to many of us ! I don't see how your formula is calculating the forecast! can you share a Pibx file please?

 

Regards
Amine Jerbi

If I answered your question, please mark this thread as accepted
and you can follow me on
My Website, LinkedIn and Facebook

Hi @aj1973 My formula isn't actually calculating the forecast. I manually put in the numbers in the Inventory column, to demonstrate what the results should be. I can post a .pbix file with the tables I have.

Hi, @FrenchConnectio 

 

Only based on your description is not good to reproduce the scene to solve your problem. Can you share a sample file containing fake data? So we can help you soon.

 

Best Regards

Janey Guo

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.