Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
sudhir_gawade
Frequent Visitor

Number of times monthly SLA missed during last six month

Hi Guys,

 

I have a senario. I have to calculate monthly SLA and compare against montly target and then I have to count during last six month how many time (month) we have missed the SLA.

 

Below is my data. monthly target is 95%.

Thanks in Advance.

 

DateTotalNot met
1-Apr1224
2-Apr1336
3-Apr2048
4-Apr15410
5-Apr1154
8-Apr959
9-Apr1301
10-Apr19319
11-Apr16112
12-Apr1603
15-Apr1394
16-Apr16611
17-Apr17013
18-Apr17210
24-Apr31915
25-Apr1691
26-Apr17310
29-Apr1514
30-Apr2527
1-May24824
2-May1695
3-May1243
7-May1401
8-May1539
9-May1666
10-May12911
13-May1135
14-May17210
15-May19017
16-May16910
17-May1303
20-May13213
21-May1721
22-May2192
23-May1675
24-May1577
28-May1549
29-May24612
30-May16413
31-May17412
3-Jun1175
4-Jun1192
5-Jun17810
6-Jun1464
7-Jun866
10-Jun1025
11-Jun1322
12-Jun19013
13-Jun1775
14-Jun1219
17-Jun1119
18-Jun1364
19-Jun1829
20-Jun14814
21-Jun1114
24-Jun1135
25-Jun1183
26-Jun23816
27-Jun1621
28-Jun16416
1 ACCEPTED SOLUTION
v-lid-msft
Community Support
Community Support

Hi @sudhir_gawade ,

 

We can create a measure to calculate the SLA,

 

SLA =
( SUM ( SLA[Total] ) - SUM ( SLA[Not Meet] ) ) / SUM ( SLA[Total] )

Then we can create a table to show the SLA of every month

 

Table = 
VAR t =
    SUMMARIZE ( 'SLA', [Date].[Month] )
RETURN
    ADDCOLUMNS (
        t,
        "SLA", CALCULATE ( [SLA], FILTER ( ALL ( SLA ), [Month] = 'SLA'[Date].[Month] ) )
    )

Number-of-times-monthly-SLA-missed-during-last-six-month-1.png

 

Then we can use a measure to count the missing month of the previous 6 month.

 

MissCount = 
COUNTROWS (
    FILTER (
        FILTER (
            'Table',
            SWITCH (
                [Month],
                "January", 1,
                "February", 2,
                "March", 3,
                "April", 4,
                "May", 5,
                "June", 6,
                "July", 7,
                "August", 8,
                "September", 9,
                "October", 10,
                "November", 11,
                "December", 12
            )
                >= MONTH ( TODAY () - 5 )
        ),
        [SLA] < 0.95
    )
)

Number-of-times-monthly-SLA-missed-during-last-six-month-2.png

 

BTW, pbix as attached.

 

Community Support Team _ DongLi
If this post helps, then please consider Accept it as the solution to help the other members find it more 

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-lid-msft
Community Support
Community Support

Hi @sudhir_gawade ,

 

We can create a measure to calculate the SLA,

 

SLA =
( SUM ( SLA[Total] ) - SUM ( SLA[Not Meet] ) ) / SUM ( SLA[Total] )

Then we can create a table to show the SLA of every month

 

Table = 
VAR t =
    SUMMARIZE ( 'SLA', [Date].[Month] )
RETURN
    ADDCOLUMNS (
        t,
        "SLA", CALCULATE ( [SLA], FILTER ( ALL ( SLA ), [Month] = 'SLA'[Date].[Month] ) )
    )

Number-of-times-monthly-SLA-missed-during-last-six-month-1.png

 

Then we can use a measure to count the missing month of the previous 6 month.

 

MissCount = 
COUNTROWS (
    FILTER (
        FILTER (
            'Table',
            SWITCH (
                [Month],
                "January", 1,
                "February", 2,
                "March", 3,
                "April", 4,
                "May", 5,
                "June", 6,
                "July", 7,
                "August", 8,
                "September", 9,
                "October", 10,
                "November", 11,
                "December", 12
            )
                >= MONTH ( TODAY () - 5 )
        ),
        [SLA] < 0.95
    )
)

Number-of-times-monthly-SLA-missed-during-last-six-month-2.png

 

BTW, pbix as attached.

 

Community Support Team _ DongLi
If this post helps, then please consider Accept it as the solution to help the other members find it more 

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thank you Smiley Happy

 

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.