Forum Discussion
dheerendram
2 years agoRegular Visitor
DAX FUNCTION HELP- Calculating SLA
Hi All, I need help with calculating SLA% for below listed data using a dax function Sample Data: Total Closed Ticket = 100 Closed 2 Days = 70 5 Days = 20 10 Days= 10 Tips: This is how I'...
- Anonymous2 years ago
Hi dheerendram ,
Please try to create measure with below dax formula:
3 Days = VAR tmp = FILTER ( ALL ( 'Table' ), [Status] = "Closed" ) VAR tmp1 = FILTER ( ALL ( 'Table' ), [Ageing] <= "3 Days" ) VAR _a = COUNTROWS ( tmp ) VAR _b = COUNTROWS ( tmp1 ) VAR _result = DIVIDE ( _b, _a ) RETURN FORMAT ( _result, "percent" )4 Days = VAR tmp = FILTER ( ALL ( 'Table' ), [Status] = "Closed" ) VAR tmp1 = FILTER ( ALL ( 'Table' ), [Ageing] <= "4 Days" ) VAR _a = COUNTROWS ( tmp ) VAR _b = COUNTROWS ( tmp1 ) VAR _result = DIVIDE ( _b, _a ) RETURN FORMAT ( _result, "percent" )Please refer the attached .pbix file.
Best regards,
Community Support Team_Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
dheerendram
2 years agoRegular Visitor
I hope I'm making more sense now. Here;s the sample data. "I calculated the ageing based on "networkingdays" and "swtich" to reflect the numbers as " Days."
| Sample Ticket ID | Created on | Closed on | Status | Ageing |
| 24 | 11/4/2023 | 11/8/2023 | Closed | 3 Days |
| 25 | 11/5/2023 | 11/9/2023 | Closed | 4 Days |
| 26 | 11/6/2023 | 11/10/2023 | Closed | 5 Days |
| 27 | 11/7/2023 | 11/11/2023 | Closed | 4 Days |
| 28 | 11/8/2023 | 11/12/2023 | Closed | 3 Days |
| 29 | 11/9/2023 | 11/13/2023 | Closed | 3 Days |
| 30 | 11/10/2023 | 11/14/2023 | Closed | 3 Days |
| 31 | 11/11/2023 | 11/15/2023 | Closed | 3 Days |
Thank you for quick response.
speedramps
Super User
2 years agoIt makes no sense. 🙄
Please put time and effort into writing questions.
Provide example input and outputs with clear consoe descripton.
Ask a manager or friend to help you if you dont know how.
Otherwise is wastes your time and ours.
We want to help.