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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Power Query if Date between

Hello, 

I'm not very good to Power Query and I don't know why it doesn't work : 

if [Order created] >= 2022-01-01 & [Order created] <= 2022-12-31 then 1 else 0

 

Thank you for your help

1 ACCEPTED SOLUTION
Anonymous
Not applicable

if[Date] >= #date(2022,01,01) and [Date] <= #date(2022,12,31)then 1 else 0

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

if[Date] >= #date(2022,01,01) and [Date] <= #date(2022,12,31)then 1 else 0

Anonymous
Not applicable

This didn't work for me, the entire formula worked until I put text in after then.

Could you take a look and see if you know the solution:

 

IF ([CancelTime] - [StartTime]) >= Time.Minute(10) and Time.Minute (18) then "Yes" else ""

 

only the "Yes" is failing and I can't seem to resolve it.

Anonymous
Not applicable

Without seeing the data it's difficult to give a correct answer. If you keep the calculation within one set of brackets maybe it will work? 

PoweredOut20_0-1657520797597.png

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors