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
Anonymous
Not applicable

Slicer to show dates between on stock report

Hi All,

 

I am trying to produce a stock report that not only shows todays stock but has a slicer so that we can see stock levels on days in the past. (i am working in direct query).

 

I have a table which show the stock status i.e in stock. Invoiced, Archived. This table has a status start date and Status end date. So for example if the status is "in stock" any date between those two dates the item is in stock.  I also have a calendar table called general date built in to the the database. 

 

I want to be able to select a date on the slicer and show all the items that would have been in stock on that day. I have tried using datesbetween but i am struggling with this one.

 

Any help on a measure would be much appreicated.

 

my tables are belowImage for community.jpg

3 REPLIES 3
v-shex-msft
Community Support
Community Support

HI @Anonymous,

 

In my opinion, I will expand detail date between start date and end date to mapping records to each day's to help create daily stock statue visualizations.

chart with start and end date

 

As you said, you are works on directquery mode, so I think my solution not suitable for your scenario.

 

Maybe you can try to add new table with expand detail dates in datasource side.

 

Regards,

Xiaoxin Sheng

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

Thank you @v-shex-msft

 

But adding to the source data is not an option currently as generated live from a sales system.

 

I will keep trying 

 

Jason

Anonymous
Not applicable

Still struggling on this one be a massive help if anyone had any ideas? 

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!

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.