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

July 28 - August 9 | Final Round of the Power BI Dataviz World Championships. This is your chance. Learn more

Reply
cottrera
Post Prodigy
Post Prodigy

DAX IF statement

Hi

I am using direct query and have  Repairs table with references and dates. I would like to add a new column with an IF statement that says IF Table = 07/10/2020 (UK date) , "Yes", No"

 

Repairs Table
Job RefDateNew Column
101/10/2020No
202/10/2020No
312/10/2020Yes
410/10/2020Yes
510/10/2020Yes
601/10/2020No
702/10/2020No
807/10/2020Yes
908/10/2020Yes
1005/10/2020No
1106/10/2020No
1212/10/2020Yes
1313/10/2020Yes
1404/10/2020No
1515/10/2020Yes

 

thanks

Richard

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@cottrera ,

Id Datatype of date is date

then try a new column

IF([DAte] =date(2020,10,7), "Yes", "No")

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@cottrera ,

Id Datatype of date is date

then try a new column

IF([DAte] =date(2020,10,7), "Yes", "No")

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Hi 

 

thank you for your response

 I tried IF([Date] =date(2020,10,7), "Yes", "No") and received a sytax error

 

How ever when I just added IF([Date] =date(2020,10,7) it gave me a true or false which is acceptable.

I will log this as resolved as between us it was.

 

thank you RIchard

 
 

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.

Fabric Community Sticker Design Challenge Barcelona Carousel

Fabric Community Sticker Challenge - Barcelona 2026

If you love stickers, then you will definitely want to check out our community sticker challenge, Barcelona edition!

July Power BI Update Carousel

Power BI Monthly Update - July 2026

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

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