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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
Daveh1983
New Member

Date search

Hi all,

 

I'm very new to power query and wanted to ask for some help. I have columns in power query with start and end dates. What I want to do is if the date is within certain peramaters to bring back a number , for example 

If date is  in-between dates xxx  and xxx then value is x or if date is between xxx and xxx then value is y 

 

I know I'm probably being stupid but you guys seem to be the ones to ask

 

Many Thanks

 

 

1 ACCEPTED SOLUTION
Syk
Resident Rockstar
Resident Rockstar

You can use a custom column to compare multiple values. It doesn't have a gui to help out but the logic should be pretty simple to follow. Check out this post which has similar requirements and an example.
Solved: Power query If submit date between start date and ... - Microsoft Power BI Community

View solution in original post

4 REPLIES 4
Syk
Resident Rockstar
Resident Rockstar

You can use a custom column to compare multiple values. It doesn't have a gui to help out but the logic should be pretty simple to follow. Check out this post which has similar requirements and an example.
Solved: Power query If submit date between start date and ... - Microsoft Power BI Community

Thank you for your help, that's perfect. 

Syk
Resident Rockstar
Resident Rockstar

You can create a conditional column and set whatever parameters work for you. Without more information it's a bit tough to help further than that!

Hi Syk,

Thanks for replying. I did look at conditional column however it appears to be just a single date rather then be able to select a date range which is what I need. (Apologies I didn't explain very well) 

I want to bring back a value for certain date ranges. Let's say between start date of 1/2/2023 and the end date of 1/3/2023 I want the value 12 to appear in the new column. If the date range falls between start date 1/4/2023 and the end date  1/5/2023 I want the value 20 to appear in the new column. 

Does that make more sense? Apologies for my poor explanation.

Cheers 

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors
Top Kudoed Authors