This is best Fabric, Power BI, SQL and AI community event. How do we know? The last event sold out! Save €200 with code FABCMTY200.
Register nowA new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.
Hey everyone
I try to create a column with the information if a ticket was closed out of the SLA or not.
I have a table with all tickets (closed and open ones). with the closed Tickets it's not an issue, if closed after the SLA date it's out of SLA. with the open ticket i need the todays date as reference (DateTime.LocalNow()).
So i created two columns:
#"Added Conditional Column5" = Table.AddColumn(#"Rounded Up", "SLA Meassure Date", each if [State] = "Closed" then [Update time] else if [State] = "Completed" then [Update time] else if [State] = "Aborted" then [Update time] else "DateTime.LocalNow()"),
#"Added Conditional Column6" = Table.AddColumn(#"Added Conditional Column5", "Einhaltung SLA", each if [SLA] = null then "No SLA" else if [SLA] >= [date 2] then "within SLA" else if [SLA] < [date 2] then "Out of SLA" else null)
But it just insert DateTime.LocalNow(), also tried TODAY() with the same result.
Ist there a possibility a manage to use the actual Date as reference?
Tank you
Regards
Robin
Solved! Go to Solution.
I believe you want:
#"Added Conditional Column5" = Table.AddColumn(#"Rounded Up", "SLA Meassure Date", each if [State] = "Closed" then [Update time] else if [State] = "Completed" then [Update time] else if [State] = "Aborted" then [Update time] else DateTime.LocalNow()),
Wow love this Community.
Thank you all for this fast responses.
Best Regards
Robin
Hi @RobinH ,
It is caused by double quotes("DateTime.LocalNow()"). If you use "", it will return the entire contents of anything inside them as text. So, you just need to remove them and then the function will work fine.
I believe you want:
#"Added Conditional Column5" = Table.AddColumn(#"Rounded Up", "SLA Meassure Date", each if [State] = "Closed" then [Update time] else if [State] = "Completed" then [Update time] else if [State] = "Aborted" then [Update time] else DateTime.LocalNow()),
Check out the May 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 27 | |
| 25 | |
| 22 | |
| 20 | |
| 14 |
| User | Count |
|---|---|
| 50 | |
| 47 | |
| 23 | |
| 18 | |
| 18 |