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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
tomcch
Frequent Visitor

Dynamic X-Axis and Date Slicer

Hello all, I have data structure like belows.

I would like to create a slicer to let user choose between [Order Date] and [Delivery Date], (which I know how to create new parameter)

then another slicers 'Year' - which based on the previous parameter to select the Year of [Order Date] or [Delivery Date]

So than I can use the Parameter as X-Axis in the visual - a bar chart that could show the sales volume based on [Order Date] or [Delivery Date] and the Year selected.

 

Is it something workable in Power BI please?
Thank you.

 

Order DateDelivery DateSales
2022-10-10 01:26:00 +00:002022-12-02 17:54:00 +00:00100
2022-11-10 23:59:00 +00:002022-11-19 15:35:00 +00:0050
2022-12-02 09:15:00 +00:002023-01-06 15:28:00 +00:0060
2023-04-04 00:00:00 +00:002023-04-18 09:09:00 +00:0070
2022-11-04 08:25:00 +00:002022-12-18 17:15:00 +00:00100
2022-11-29 00:00:00 +00:002022-12-27 11:50:00 +00:0050
2023-04-20 04:45:00 +00:002023-05-03 05:13:00 +00:0060
2023-05-15 22:40:00 +00:002023-05-22 14:45:00 +00:0070
2023-12-01 15:57:00 +00:002023-12-05 22:34:00 +00:00100
2023-12-09 05:40:00 +00:002024-01-06 07:00:00 +00:0050
2024-01-03 00:00:00 +00:002024-01-06 16:15:00 +00:0060
2023-11-23 19:30:00 +00:002024-01-05 04:06:00 +00:0070
2023-12-02 03:47:00 +00:002024-01-04 11:32:00 +00:00100
2023-11-25 22:27:00 +00:002024-01-06 07:13:00 +00:0050
2023-12-22 01:00:00 +00:002024-01-06 05:30:00 +00:0060
2023-11-28 00:00:00 +00:002023-12-31 00:00:00 +00:0070
2023-11-05 02:00:00 +00:002023-11-17 22:30:00 +00:00100
2023-11-26 22:32:00 +00:002024-01-04 16:00:00 +00:0050
2023-12-22 01:00:00 +00:002024-01-06 05:30:00 +00:0060
2023-11-16 20:06:00 +00:002024-01-06 07:13:00 +00:0070
1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @tomcch,

AFAIK, current power bi does not support to filter across two date fields at the same time.

I'd like to suggest you create an unconnected date table with date values over the start, end date from two date fields.

Then you can use it as axis to design chart and write a measure formula based on filter selection and calculated correspond records based on current selected fields values.

Regards,
Xiaoxin Sheng

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Hi @tomcch,

AFAIK, current power bi does not support to filter across two date fields at the same time.

I'd like to suggest you create an unconnected date table with date values over the start, end date from two date fields.

Then you can use it as axis to design chart and write a measure formula based on filter selection and calculated correspond records based on current selected fields values.

Regards,
Xiaoxin Sheng

Helpful resources

Announcements
June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 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.