Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
Hello Guys,
I have a scenario here;
I need to calulate SLA percentage based on the Priority.
I have 3-columns:
Now SLA is calulated as count of ticket for which priority a has met divided by total count of ticket for that priority
Example
For Priority: Low
Total Tickets: 100
Has Met SLA : 95
Has not met SLA: 5
SLA Percentage: 95%
I need help with DAX calculation how will i get the SLA percentage.
Solved! Go to Solution.
Tickets = COUNT(Table1[Ticket ID])
SLA%_2 = COUNT(Table1[SLA_Check - Text]) / CALCULATE(COUNT(Table1[SLA_Check - Text]), ALL(Table1[SLA_Check - Text]))
Proud to give back to the community!
Thank You!
Is your Has Met SLA YES/NO (text) or 0/1 (bit)?
Proud to give back to the community!
Thank You!
Its a text. Yes/No
Hope this helps...
Measures:
Tickets = COUNT(Table1[Ticket ID]) // ALL Tickets (In a Table, Power BI automatically groups by values (i.e. Priority)
Pass_SLA = CALCULATE(COUNT(Table1[SLA_Check - Text]), // Counts # of Tickets
Table1[SLA_Check - Text] = "YES") // Filtering for only "YES"
SLA% = [Pass_SLA] / CALCULATE(COUNT(Table1[SLA_Check - Text]), ALL(Table1[SLA_Check - Text]))
// The ALL brings back in ALL values, but still maintains the Table Measures (grouping i.e. Priority)
Proud to give back to the community!
Thank You!
will the percentage be same if I have SLA CHeck column in visual?
It doesn't look like it unless you filter to only include "YES' values... Please mock up what you want the final table to look like...?
FOrrest
Proud to give back to the community!
Thank You!
Solution should be something like this
SLA Check Priority ticket count sla%
yes High 90 90%
no High 10 10%
yes low 75 75%
no low 25 25%
Tickets = COUNT(Table1[Ticket ID])
SLA%_2 = COUNT(Table1[SLA_Check - Text]) / CALCULATE(COUNT(Table1[SLA_Check - Text]), ALL(Table1[SLA_Check - Text]))
Proud to give back to the community!
Thank You!
Thanks.
That works.
Ignore my 0/1 column, I was building that direction until I got your reply. Forrest
Proud to give back to the community!
Thank You!
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 |
|---|---|
| 44 | |
| 43 | |
| 38 | |
| 19 | |
| 15 |
| User | Count |
|---|---|
| 68 | |
| 64 | |
| 31 | |
| 29 | |
| 24 |