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
Huybs
New Member

Slicer to filter a date and show values between a start- and end-date

Hi,

 

I have a set of historic data about all the orders we have received and shipped.

I know from this data that an order has been a 'backorder' between a startdate and an enddate.

 

What I want to do is show the backorder value of the orders at a certain point in time. I am guessing that I need to have a unique table with dates (1 row for every day), and link this with the historic backorder data... But how?

 

For example

 

Order numberStart date backorderEnd date backorderOrder value
A19-Oct25-Oct€10
B22-Oct27-Oct€20
C24-Oct30-Oct€15

 

If I were to slice to see the backorder status for 20-Oct I would see a value of €10

If I were to slice to see the backorder status for 23-Oct I would see a value of €30 (order A + B)

And so on...

 

Thank you in advance for your help!

1 ACCEPTED SOLUTION
v-diye-msft
Community Support
Community Support

Hi,

 

1. Add a calendar table as slicer:

Table 2 = CALENDAR(DATE(2019,1,1),DATE(2019,12,31))

2. Add below measure:

Measure = CALCULATE(SUM('Table'[Order value]),FILTER('Table',[Start date backorder]<=MAX('Table 2'[Date])&&[End date backorder]>=MIN('Table 2'[Date])))

005.PNG

 

Community Support Team _ Dina Ye
If this post helps, then please consider Accept it as the solution to help the other members find it more
quickly.

View solution in original post

1 REPLY 1
v-diye-msft
Community Support
Community Support

Hi,

 

1. Add a calendar table as slicer:

Table 2 = CALENDAR(DATE(2019,1,1),DATE(2019,12,31))

2. Add below measure:

Measure = CALCULATE(SUM('Table'[Order value]),FILTER('Table',[Start date backorder]<=MAX('Table 2'[Date])&&[End date backorder]>=MIN('Table 2'[Date])))

005.PNG

 

Community Support Team _ Dina Ye
If this post helps, then please consider Accept it as the solution to help the 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.