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
EBGAL
Helper III
Helper III

Filter report on date between other column dates

Hi, community,

 

I have a table, such as:

Project IdCycle IdCycle StartCycle Finish
111/02/20215/03/2021
211/02/20215/03/2021
328/03/202111/03/2021
428/03/202111/03/2021
528/03/202111/03/2021

In the report, I want to filter out all projects which are not in the current cycle.

 

Thanks

Evan

1 ACCEPTED SOLUTION

@amitchandak , I have figured out how to do this.

To explain a little more about the task, I have different reports on current project cycle, next project cycle and so on. Thus, I needed to filter out the content by cycle timeframe. 

I used Greg Deckler's reply here https://community.powerbi.com/t5/Desktop/Power-Query-If-x-number-is-between-x-and-y-then-quot-Delete... to index all current and future cycles, so that I got 1 for current, 2 for next etc., and applied page filter based on the cycle number.

 

Thanks

Evan

View solution in original post

3 REPLIES 3
amitchandak
Super User
Super User

@EBGAL , Can you explain with examples. The expected output is not clear to me .

 

Try a measure like this with independent date table

measure =
var _max1 = maxx(allselected('Date'), Date[Date])
var _min1 = minx(allselected('Date'), Date[Date])
return
calculate(count([Project Id]), filter('Table', 'Table'[Cycle Finish] <=_max1 && 'Table'[Cycle Finish] >=_min1 ))

@amitchandak , I have figured out how to do this.

To explain a little more about the task, I have different reports on current project cycle, next project cycle and so on. Thus, I needed to filter out the content by cycle timeframe. 

I used Greg Deckler's reply here https://community.powerbi.com/t5/Desktop/Power-Query-If-x-number-is-between-x-and-y-then-quot-Delete... to index all current and future cycles, so that I got 1 for current, 2 for next etc., and applied page filter based on the cycle number.

 

Thanks

Evan

@EBGAL , Thanks for the update. Kudos to you. We all are learning from Greg's blogs and solutions. 

 

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.