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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

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
Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Jan NL Carousel

Fabric Community Update - January 2025

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