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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Anonymous
Not applicable

Issue is DAX formula

Hi Experts ,

I am new to Power BI.

My requirement is , I need to find out if Resolved date is after eg . 17/01/2020 then   Flag  should populate as  "Y" else "N".

Issue is there are records where resolved Date is blank then formula gives an error .

Could you please suggest .

 

Incident Number   Resolved date         Flag 

  1                             18/01/2020            Y

2                                15/01/2020           N

3                                                             N

4                                                             N

 

Regards,

Ganesh J

1 ACCEPTED SOLUTION
Ashish_Mathur
Super User
Super User

Hi,

Try this calculated column formula

=IF(Data[Resolved Date])>DATE(2020,1,17),"Y","N")

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

2 REPLIES 2
Ashish_Mathur
Super User
Super User

Hi,

Try this calculated column formula

=IF(Data[Resolved Date])>DATE(2020,1,17),"Y","N")

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
dm-p
Super User
Super User

Hi @Anonymous,

I'm not sure if you want this as a column or a measure, but you just need to check the date is not BLANK before comparing it. The following should be enough to illustrate how to do this and apply to your situation:

Flag =
VAR ReferenceDate =
    DATE ( 2020, 1, 17 )
RETURN
    IF (
        NOT ( ISBLANK ( 'Table'[Resolved Date] ) )
            && 'Table'[Resolved Date] > ReferenceDate,
        "Y",
        "N"
    )

In this example, I'm not sure how you're sourcing the reference date so I have declared this as a variable up-top in case you are defining it using DAX and this will make it easier to maintain.

Good luck!

Daniel


If my post solves your challenge, then please consider accepting as a solution to help other forum members find the answer more quickly 🙂





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!


On how to ask a technical question, if you really want an answer (courtesy of SQLBI)




Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors