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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.