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
Ramakrishna7032
New Member

Power query to find date present between two dates

I have a date field in my table i want to write a power query for new column to find date between two dates. if present it returns true else false 

Ramakrishna7032_0-1662554606489.png

 

1 ACCEPTED SOLUTION
davehus
Memorable Member
Memorable Member

Hi @Ramakrishna7032 ,

 

Add a custom column and see if it works.

if [DateKey]> Date.FromText("01/01/2022") and [DateKey]< Date.FromText("31/01/2022") then 1 else 0

 Hope this helps.

 

Did I help you today? Please accept my solution and hit the Kudos button.

View solution in original post

2 REPLIES 2
davehus
Memorable Member
Memorable Member

Hi @Ramakrishna7032 ,

 

Add a custom column and see if it works.

if [DateKey]> Date.FromText("01/01/2022") and [DateKey]< Date.FromText("31/01/2022") then 1 else 0

 Hope this helps.

 

Did I help you today? Please accept my solution and hit the Kudos button.

Hi @davehus,

Appreciated your solution. I had one more question like can we write a power query to know the term is updated in last 24 hours??

thanks in advance

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

Check out the June 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
Top Kudoed Authors