Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by watching the DP-600 session on-demand now through April 28th.
Learn moreJoin the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now
Hi All im after help on this,
Im Reporting on SLAs and need to show the "SLA status"
Please can I have a DAX forumla that will output this?
Here is an example Data set, Status of the ticket. When the fault is to be fixed by, Todays date and Time, If todays date is Past the expected fix date and the ticket is still in open status it needs to show "breach" .
| Status | Expected fix Date | Todays Date | SLA Status |
| Open | 30/02/2022 14:52 | 28/03/2022 13:05 | Breach |
| Open | 05/04/2022 15:09 | 28/03/2022 13:05 | On Track |
| Closed | 27/03/2022 14:05 | 28/03/2022 13:05 | HIT |
Thanks
Dan
Solved! Go to Solution.
This is how you can do it with Power Query.
Table.AddColumn(#"Changed Type", "Breach Status", each if [Todays Date] > [#"Expected fix Date "] and [Status] = "Open" then "Breach" else "Not Breach", type text)
Sample Script
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45W8i9IzVPSUTIw0jey0DcyMDJSMDSxMjUCCRkjhIytDEyBQk5FqYnJGUqxOgh9JvoGplBFplYGltj1+ecphBQlJmeDdTrn5BenpkAVmsPtBCvEotfDM0QpNhYA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Status = _t, #"Expected fix Date " = _t, #"Todays Date" = _t, #"SLA Status" = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Todays Date", type datetime}, {"Expected fix Date ", type datetime}}),
#"Added Custom1" = Table.AddColumn(#"Changed Type", "Breach Status", each if [Todays Date] > [#"Expected fix Date "] and [Status] = "Open" then "Breach" else "Not Breach", type text)
in
#"Added Custom1"
This is how you can do it with DAX:
Breach Status DAX = if(and('Table'[Status] = "Open",'Table'[Expected fix Date ]<'Table'[Todays Date]),"Breach","Not Breach")
This is how you can do it with Power Query.
Table.AddColumn(#"Changed Type", "Breach Status", each if [Todays Date] > [#"Expected fix Date "] and [Status] = "Open" then "Breach" else "Not Breach", type text)
Sample Script
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45W8i9IzVPSUTIw0jey0DcyMDJSMDSxMjUCCRkjhIytDEyBQk5FqYnJGUqxOgh9JvoGplBFplYGltj1+ecphBQlJmeDdTrn5BenpkAVmsPtBCvEotfDM0QpNhYA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Status = _t, #"Expected fix Date " = _t, #"Todays Date" = _t, #"SLA Status" = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Todays Date", type datetime}, {"Expected fix Date ", type datetime}}),
#"Added Custom1" = Table.AddColumn(#"Changed Type", "Breach Status", each if [Todays Date] > [#"Expected fix Date "] and [Status] = "Open" then "Breach" else "Not Breach", type text)
in
#"Added Custom1"
This is how you can do it with DAX:
Breach Status DAX = if(and('Table'[Status] = "Open",'Table'[Expected fix Date ]<'Table'[Todays Date]),"Breach","Not Breach")
Whatever data you have supplied, you can use following formula
=if([Status]="Open",if([Expected fix Date]<[Todays Date],"Breach","On Track"),"HIT")
Check out the April 2026 Power BI update to learn about new features.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
| User | Count |
|---|---|
| 5 | |
| 4 | |
| 4 | |
| 4 | |
| 4 |