Forum Discussion
Anonymous
6 years agoNot 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 ...
- 6 years ago
Hi,
Try this calculated column formula
=IF(Data[Resolved Date])>DATE(2020,1,17),"Y","N")
Hope this helps.
dm-p
6 years agoSuper 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 🙂