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
ssk_1984
Frequent Visitor

Consecutive SLA Misses over a period of time

Hi,

 

i have to find the consecutive misses of sla ' not met ' > 3 times by the unique value Metric Final ID.

 

in the below sample data, id 12 misses 3 consecutive time from 10th, 11th and 12th month of 2021 , that is count as 1...

then 2nd time 7th,8th & 9th month of 2022, counted as 2

then 3rd time it is from 8th, 9th & 10th month...Count as 3

 

sample data

Final IDSLA ResultReport DateCount3 Consecutive Misses
12Not Met01-10-20211 
12Not Met01-11-20212 
12Not Met01-12-202131
34Met01-12-20211 
12Not Met01-07-20221 
12Not Met01-08-20222 
12Not Met01-09-202231
12Not Met01-10-202241
23Met01-07-20221 
23Not Met01-08-20222 
12Not Met01-07-20221 
12Not Met01-08-20222 
12Not Met01-10-20221 
12Not Met01-11-20222 

 

please help me 

2 ACCEPTED SOLUTIONS
amitchandak
Super User
Super User

@ssk_1984 , check if this logic can help

Power BI- Customer Purchasing in each of the last 3 months: https://youtu.be/bGtjoccEA38

View solution in original post

v-yetao1-msft
Community Support
Community Support

Hi @ssk_1984 

First you need add a index column for your table ,because you have some of the exact same lines .

Ailsamsft_0-1669097156878.png

Then create calculated column to group your final id .

IF = 
var _index=SUMX(FILTER(ALL('Table'),'Table'[Index]=EARLIER('Table'[Index])),[Final ID])
var _index2=SUMX(FILTER(ALL('Table'),'Table'[Index]=EARLIER('Table'[Index])-1),[Final ID])
return
IF( _index <> _index2,1,0)
Group = SUMX(FILTER(ALL('Table'),'Table'[Index]<=EARLIER('Table'[Index])),[IF])

You will get a result like this :

Ailsamsft_1-1669097267691.png

Finally , create a calculated column to count the ' not met ' > 3 times .

CountRow = 
var _count=CALCULATE(COUNT('Table'[SLA Result]),FILTER(ALLEXCEPT('Table','Table'[Group]),'Table'[SLA Result]="Not Met"))
return IF(_count>=3 && 'Table'[Count]=3 || 'Table'[Count]=4,1,BLANK())

The final result is as shown below .

Ailsamsft_2-1669097418430.png

 

Best Regards,
Community Support Team _ Ailsa Tao
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-yetao1-msft
Community Support
Community Support

Hi @ssk_1984 

First you need add a index column for your table ,because you have some of the exact same lines .

Ailsamsft_0-1669097156878.png

Then create calculated column to group your final id .

IF = 
var _index=SUMX(FILTER(ALL('Table'),'Table'[Index]=EARLIER('Table'[Index])),[Final ID])
var _index2=SUMX(FILTER(ALL('Table'),'Table'[Index]=EARLIER('Table'[Index])-1),[Final ID])
return
IF( _index <> _index2,1,0)
Group = SUMX(FILTER(ALL('Table'),'Table'[Index]<=EARLIER('Table'[Index])),[IF])

You will get a result like this :

Ailsamsft_1-1669097267691.png

Finally , create a calculated column to count the ' not met ' > 3 times .

CountRow = 
var _count=CALCULATE(COUNT('Table'[SLA Result]),FILTER(ALLEXCEPT('Table','Table'[Group]),'Table'[SLA Result]="Not Met"))
return IF(_count>=3 && 'Table'[Count]=3 || 'Table'[Count]=4,1,BLANK())

The final result is as shown below .

Ailsamsft_2-1669097418430.png

 

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

amitchandak
Super User
Super User

@ssk_1984 , check if this logic can help

Power BI- Customer Purchasing in each of the last 3 months: https://youtu.be/bGtjoccEA38

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.

Top Solution Authors