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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
AKhan
Regular Visitor

Power Bi desktop timeline slicer filter with other

Hi all,

I am a new in power bi desktop,and created a timeline slicer with date field(In-date) and have two  fields,In-date and  Out-date  .

need: filter count of  Out-date  field  with status using In-date field start and end date(means range)

and done following things.

1.got start and end date from In-date field on timeline slicer slicer selection(Created a measure):

 

StartDate = CALCULATE ( MIN( Tour[In-date].[Date]),ALLSELECTED(Tour[In-date].[Date]))

EndDate = CALCULATE ( MAX( Tour[In-date].[Date]),ALLSELECTED(Tour[In-date].[Date]))

 

2.count  using Out-date.

CountTest4 = CALCULATE(COUNT(Tour[In-date].[Date] ),DATESBETWEEN(Tour[Out-date].[Date],StartDate ,EndDate ))

 

table

Status   In-date                      Out-date

Open   20-03-2017             19-03-2017

Open   20-03-2017             20-03-2017

Close   30-03-2017            04-04-2017

 

Timeline slicer date selection from In-date is 19-03-2017 to 20-03-2017 and now filter from Out-date .

result should be:

Status  CountTest4

Open    2

 

 

problem: result is not coming correct.

 

 

thanks

 

 

 

 

 

 

 

 

 

 

1 ACCEPTED SOLUTION

Hi Xiaoxin Sheng,


Thank you for reply,


But my question is that filter from another table with timeline silcer date range and this already mention query .


I have resolved this problem with create a view of a table.

Thanks

Akram

View solution in original post

2 REPLIES 2
v-shex-msft
Community Support
Community Support

Hi @AKhan,

 

Based on test, "datesbetween" function seems not work on dynamic date range.

 

You can try to use below formula to achieve your requirement.

 

CountTest4 = CALCULATE(COUNT('123'[In-date].[Date]),FILTER(ALL('123'),[in-date]>=[StartDate]&&[in-date]<=[EndDate] ))

 

Regards,
Xiaoxin Sheng

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

Hi Xiaoxin Sheng,


Thank you for reply,


But my question is that filter from another table with timeline silcer date range and this already mention query .


I have resolved this problem with create a view of a table.

Thanks

Akram

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!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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