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

See when key Fabric features will launch and what’s already live, all in one place and always up to date. Explore the new Fabric roadmap

Reply
Anonymous
Not applicable

Integrate Filter into a column

Hi Power BI Community!

I have this very simple column = 

timediff(days) = PO date (start delivery) - deliverend on date

I have a chart with my PO date. I want to show how many deliverys arrived in 0-5 days, 5-15 days, 15-30 days and more than 30 days in one chart.

If I filter the date to only show 0-5 days and so one it works good with bookmarks but How can I do this in one chart.

My idea was to creat measures for every single condition. For example = Count(PO date) and then a filter only show timediff 0-5 days.


How can I  Filter with single date values?

Problem timediff.PNG

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , Not very clear

If timediff is column

Then you can have columns

New column =
var _diff = datediff([PO date (start delivery)] , [deliverend on date] Day)
return
Switch ( True() ,
_diff <= 5, " 0-5 Days" ,
_diff <= 15, "5-15 Days" ,
_diff <= 30, "15-30 Days" ,
"more than 30 day"
)

And use that as a filter.

 

If that is measure then you need dynamic Segmentation: https://www.youtube.com/watch?v=CuczXPj0N-k 

 

 

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

@Anonymous , Not very clear

If timediff is column

Then you can have columns

New column =
var _diff = datediff([PO date (start delivery)] , [deliverend on date] Day)
return
Switch ( True() ,
_diff <= 5, " 0-5 Days" ,
_diff <= 15, "5-15 Days" ,
_diff <= 30, "15-30 Days" ,
"more than 30 day"
)

And use that as a filter.

 

If that is measure then you need dynamic Segmentation: https://www.youtube.com/watch?v=CuczXPj0N-k 

 

 

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
May PBI 25 Carousel

Power BI Monthly Update - May 2025

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

May 2025 Monthly Update

Fabric Community Update - May 2025

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