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 everyone,
I really hope you can help, I'm completely new to PowerBI and DAX but am giving creating a new column a go in my dataset. I have the below but when I run it through a DAX checker and it says it is missing a syntax but doesn't tell me where unfortunately.
SLA Met = IF(AND([State Open] = "0", [Incident Type] = "Incident", [Work Time Duration Formatted] >3), "Yes", IF(AND([State Open] = "0", [Incident Type] = "Service Request"), "NO", "Open"))
Am I not able to have 3 conditions for my first section? I intend to add a 3rd condition to the 2nd result also but want to nail this one to begin with.
Effetively in the end I want to build it up so that the results show as below:
State Open Incident Type Work Time Duration Formatted Result
0 Incident >3 Miss
0 Incident <=3 Hit
0 Service Request >5 Miss
0 Service Request <=5 Hit
Anything else would be "Open"
Thanks so much if anyone is able to assist, hopefully it's an easier one?
Solved! Go to Solution.
The AND function has only two arguments, use the && operator instead so it's easier to write.
SLA Met = IF ( [State Open] = "0" && [Incident Type] = "Incident" && [Work Time Duration Formatted] > 3, "Yes", IF ( [State Open] = "0" && [Incident Type] = "Service Request", "NO", "Open" ) )
The AND function has only two arguments, use the && operator instead so it's easier to write.
SLA Met = IF ( [State Open] = "0" && [Incident Type] = "Incident" && [Work Time Duration Formatted] > 3, "Yes", IF ( [State Open] = "0" && [Incident Type] = "Service Request", "NO", "Open" ) )