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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

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