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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Anonymous
Not applicable

How to get pass/fail for any kpi for successive failed site for more than 2 Quarters

Hi Team

 

Below is the sample data- 

 

CountrySiteKPIsMonthValuePassFail(1,0)Quarter
IndiaChennai (Akash)KPI2Feb-21Fail1Q1
IndiaChennai (Akash)KPI5Feb-21Pass0Q1
IndiaChennai (Akash)KPI6Feb-21Fail1Q1
IndiaChennai (Akash)KPI7Feb-21Pass0Q1
IndiaChennai (Akash)KPI2May-21Pass0Q2
IndiaChennai (Akash)KPI5May-21Pass0Q2
IndiaChennai (Akash)KPI6May-21Pass0Q2
IndiaChennai (Akash)KPI7May-21Pass0Q2
IndiaChennai (Akash)KPI5Aug-21Pass0Q3
IndiaChennai (Akash)KPI6Aug-21Fail1Q3
IndiaChennai (Akash)KPI7Aug-21Pass0Q3
IndiaChennai (Akash)KPI5Nov-21Pass0Q4
IndiaChennai (Akash)KPI6Nov-21Pass0Q4
IndiaChennai (Akash)KPI7Nov-21Pass0Q4
IndiaChennai (Akash)KPI8Feb-21Fail1Q1
IndiaChennai (Akash)KPI8May-21Fail1Q2
IndiaChennai (Akash)KPI8Aug-21Fail1Q3
IndiaChennai (Akash)KPI8Nov-21Fail1Q4
VietnamHanoiKPI2Feb-21Fail1Q1
VietnamHanoiKPI2May-21Fail1Q2
VietnamHanoiKPI2Aug-21Fail1Q3
VietnamHanoiKPI5Feb-21Pass0Q1
VietnamHanoiKPI5May-21Pass0Q2
VietnamHanoiKPI5Aug-21Pass0Q3
VietnamHanoiKPI5Nov-21Pass0Q4
VietnamHanoiKPI6Feb-21Fail1Q1
VietnamHanoiKPI6May-21Pass0Q2
VietnamHanoiKPI6Aug-21Fail1Q3
VietnamHanoiKPI6Nov-21Pass0Q4
VietnamHanoiKPI7Feb-21Pass0Q1
VietnamHanoiKPI7May-21Fail1Q2
VietnamHanoiKPI7Aug-21Pass0Q3
VietnamHanoiKPI7Nov-21Pass0Q4
VietnamHanoiKPI8Feb-21Fail1Q1
VietnamHanoiKPI8May-21Fail1Q2
VietnamHanoiKPI8Aug-21Fail1Q3
VietnamHanoiKPI8Nov-21Fail1Q4
ThailandBangkokKPI2Feb-21Pass0Q1
ThailandBangkokKPI5Feb-21Pass0Q1
ThailandBangkokKPI5May-21Pass0Q2
ThailandBangkokKPI5Aug-21Pass0Q3
ThailandBangkokKPI5Nov-21Pass0Q4
ThailandBangkokKPI6Feb-21Fail1Q1
ThailandBangkokKPI6May-21Pass0Q2
ThailandBangkokKPI6Aug-21Fail1Q3
ThailandBangkokKPI6Nov-21Pass0Q4
ThailandBangkokKPI7Feb-21Pass0Q1
ThailandBangkokKPI7May-21Pass0Q2
ThailandBangkokKPI7Aug-21Pass0Q3
ThailandBangkokKPI7Nov-21Pass0Q4
ThailandBangkokKPI8Feb-21Fail1Q1
ThailandBangkokKPI8May-21Pass0Q2
ThailandBangkokKPI8Aug-21Fail1Q3
ThailandBangkokKPI8Nov-21Fail1Q4
SingaporeSingapore (Mapletree)KPI2Feb-21Fail1Q1
SingaporeSingapore (Mapletree)KPI5Feb-21Pass0Q1
SingaporeSingapore (Mapletree)KPI5May-21Pass0Q2
SingaporeSingapore (Mapletree)KPI5Aug-21Pass0Q3
SingaporeSingapore (Mapletree)KPI5Nov-21Pass0Q4
SingaporeSingapore (Mapletree)KPI6Feb-21Fail1Q1
SingaporeSingapore (Mapletree)KPI6May-21Pass0Q2
SingaporeSingapore (Mapletree)KPI6Aug-21Fail1Q3
SingaporeSingapore (Mapletree)KPI6Nov-21Pass0Q4
SingaporeSingapore (Mapletree)KPI7Feb-21Pass0Q1
SingaporeSingapore (Mapletree)KPI7May-21Pass0Q2
SingaporeSingapore (Mapletree)KPI7Aug-21Pass0Q3
SingaporeSingapore (Mapletree)KPI7Nov-21Pass0Q4
SingaporeSingapore (Mapletree)KPI8Feb-21Fail1Q1
SingaporeSingapore (Mapletree)KPI8May-21Fail1Q2
SingaporeSingapore (Mapletree)KPI8Aug-21Fail1Q3
SingaporeSingapore (Mapletree)KPI8Nov-21Fail1

Q4

 

and below is the requirement for result

 

KPIsQ1Q2Q3Q4
KPI2    
KPI5    
KPI6    
KPI7    
KPI8   

 

 

I want to decide pass/fail for available kpis on the basis whether a site is failed for two successive quarter -> Is there any way to apply this logic?

 

Please help.. Please please please... I am indire strait of this... please look into this.

 

Thanks and regards

RatanB 

 

@amitchandak Please look and help sir

1 ACCEPTED SOLUTION
Anonymous
Not applicable

var _successive_Fail=CALCULATE(
COUNT(SummaryKPI[Quarter Concatenate]),
FILTER(
ALLSELECTED(SummaryKPI[Quarter]),
ISONORAFTER(SummaryKPI[Quarter],MAX(SummaryKPI[Quarter]),desc)
))
Return
 
Above dax helped/led me in solving my above queries. Thanks to all the mentors to look into this.

View solution in original post

5 REPLIES 5
Anonymous
Not applicable

var _successive_Fail=CALCULATE(
COUNT(SummaryKPI[Quarter Concatenate]),
FILTER(
ALLSELECTED(SummaryKPI[Quarter]),
ISONORAFTER(SummaryKPI[Quarter],MAX(SummaryKPI[Quarter]),desc)
))
Return
 
Above dax helped/led me in solving my above queries. Thanks to all the mentors to look into this.
VahidDM
Super User
Super User

Hi @Anonymous 

 

Add more details about the result? do you want to show the count of fails in each Quarter for each KPIs like this:

VahidDM_0-1630934676393.png

 

Or just want to show the count of the failed for two successive quarters in that table?

 

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.

Appreciate your Kudos ✌️!!

 

Anonymous
Not applicable

Thanks for your reply.. This is wat I have achieved.. what I am trying here to check

1) whether a site is failed in successive quarter - like if chennai has failed in Q1 and then again in Q1 for kpi2.. then it should show result as fail. And same for other KPIs...

@Anonymous 

 

Can you create a sample of your result Table/Column/... in excel and share it here?

Anonymous
Not applicable

Hey morning Vahid

 

Below is the sample of table

 

KPIsQ1Q2Q3Q4
KPI2PassFailFailPass
KPI5    
KPI6    
KPI7    
KPI8   

 

 

Only condition is if any site is found failed in successive quarter - after that quarter - must be failed.

 

Thanks and regards

RatanB

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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