The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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
Solved! Go to Solution.
Hi,
Try this calculated column formula
=IF(Data[Resolved Date])>DATE(2020,1,17),"Y","N")
Hope this helps.
Hi,
Try this calculated column formula
=IF(Data[Resolved Date])>DATE(2020,1,17),"Y","N")
Hope this helps.
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 🙂
Proud to be a Super User!
On how to ask a technical question, if you really want an answer (courtesy of SQLBI)