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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
SDVN
Helper I
Helper I

Why IF formula is not working for calculated measure?

Dear Experts, 

 

I am learning power BI and I have a situation where am creating a measure using IF statement. Like IF a date in one column is greater or equal to date in another column, i need a perticular result , else it can tell "NULL". When i try "IF(closed Date >="Date of Offer Acceptance.." Power BI doesn't even recognise the formula. Can you help? Do let me know if you need more clarity. 🙂

I have attached a screenshot of this recruitment data. 

 

SDVN_0-1669061100384.png

 

 

regards,

Sid

1 ACCEPTED SOLUTION
v-jingzhang
Community Support
Community Support

Hi @SDVN 

 

Here is Microsoft's DAX syntax document for your reference. Since you don't have much basic DAX knowledge currently, I recommend that you create a calculated column to test the IF statement. You can create a column with below formula. Notice that the column name needs to be enclosed in brackets.

New column = IF([Closed Date]>=[Date of Offer Acceptance],"A particular result",BLANK())

IF function (DAX) - DAX | Microsoft Learn

 

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

 

View solution in original post

2 REPLIES 2
v-jingzhang
Community Support
Community Support

Hi @SDVN 

 

Here is Microsoft's DAX syntax document for your reference. Since you don't have much basic DAX knowledge currently, I recommend that you create a calculated column to test the IF statement. You can create a column with below formula. Notice that the column name needs to be enclosed in brackets.

New column = IF([Closed Date]>=[Date of Offer Acceptance],"A particular result",BLANK())

IF function (DAX) - DAX | Microsoft Learn

 

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

 

daXtreme
Solution Sage
Solution Sage

I advise you first learn the very basics of DAX (plenty of materials on YT). DAX is a programming language and has its own syntax. You should learn, first and foremost, what correct DAX looks like. Writing anything you think should work will most likely not work because you have to stick to the rules (it's like in mathematics). By the way, you're not writing a measure but a calculated column. 2 very, very different things...

 

Here's something you could/should(?) watch first: https://youtu.be/waG_JhBgUpM

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors