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

How create greater than from calendar date picker

I am trying to create a date filter that filters data like this (Finish_Date >= value selected), meaning that if a user selected today's date, they will get a results for today's date and beyond , it will look ahead. Additionally  the second filter should do the opposite, when the user select todays date, they get the data for today and all the previous days (Start_Date <= value selected). Does anyone know how to create such a filter?

1 ACCEPTED SOLUTION
v-zhangti
Community Support
Community Support

Hi, @Anonymous 

 

You can try the following methods.
Sample data:

vzhangti_0-1675651544634.png

Create a new date table.

Date = CALENDARAUTO()

Measure:

Measure1 = IF(SELECTEDVALUE('Table'[Date])>=SELECTEDVALUE('Date'[Date]),1,0)
Measure2 = IF(SELECTEDVALUE('Table'[Date])<=SELECTEDVALUE('Date'[Date]),1,0)

vzhangti_1-1675651664584.png

Put measure separately in the filter of the corresponding view and set equal to 1.

vzhangti_2-1675651781276.png

Is this the result you expect?

 

Best Regards,

Community Support Team _Charlotte

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

3 REPLIES 3
v-zhangti
Community Support
Community Support

Hi, @Anonymous 

 

You can try the following methods.
Sample data:

vzhangti_0-1675651544634.png

Create a new date table.

Date = CALENDARAUTO()

Measure:

Measure1 = IF(SELECTEDVALUE('Table'[Date])>=SELECTEDVALUE('Date'[Date]),1,0)
Measure2 = IF(SELECTEDVALUE('Table'[Date])<=SELECTEDVALUE('Date'[Date]),1,0)

vzhangti_1-1675651664584.png

Put measure separately in the filter of the corresponding view and set equal to 1.

vzhangti_2-1675651781276.png

Is this the result you expect?

 

Best Regards,

Community Support Team _Charlotte

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Anonymous
Not applicable

I needed to be able to use this new column as a date filter in the report builder but the results you are showing are in Power BI, would you be kind enoughto point me to the workaround on this?

sevenhills
Super User
Super User

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.