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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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 

 

 

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 

 

 

Helpful resources

Announcements
July 2024 Power BI Update

Power BI Monthly Update - July 2024

Check out the July 2024 Power BI update to learn about new features.

PBI_Carousel_NL_June

Fabric Community Update - June 2024

Get the latest Fabric updates from Build 2024, key Skills Challenge voucher deadlines, top blogs, forum posts, and product ideas.

Top Solution Authors