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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Syndicate_Admin
Administrator
Administrator

Consecutive champions

I am in development of a practice and I have a table, where I am asked to make a formula to tell me which were the clubs that won in consecutive years.

RudyGoaz25_0-1670009128581.png

1 ACCEPTED SOLUTION
v-xinruzhu-msft
Community Support
Community Support

Hi  Syndicate_Admin

 

 You can create a new column

Is continuss_ = VAR A=FILTER('Table (2)','Table (2)'[Team]=EARLIER('Table (2)'[Team])&&'Table (2)'[Column]=EARLIER('Table (2)'[Year])) 
VAR B=FILTER('Table (2)','Table (2)'[Team]=EARLIER('Table (2)'[Team])) 
VAR C=LEFT(MINX(B,[Year]),4)+0=LEFT(MAXX(B,[Year]),4)-COUNTROWS(B)+1 
RETURN IF(COUNTAX(A,[Team])>0,TRUE(),IF(C=TRUE()&&COUNTROWS(B)>1,TRUE(),FALSE()))

vxinruzhumsft_0-1670491809123.png

 

Is this the output you want?

 

 

 

Best Regards,

Yolo Zhu

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-xinruzhu-msft
Community Support
Community Support

Hi  Syndicate_Admin

 

 You can create a new column

Is continuss_ = VAR A=FILTER('Table (2)','Table (2)'[Team]=EARLIER('Table (2)'[Team])&&'Table (2)'[Column]=EARLIER('Table (2)'[Year])) 
VAR B=FILTER('Table (2)','Table (2)'[Team]=EARLIER('Table (2)'[Team])) 
VAR C=LEFT(MINX(B,[Year]),4)+0=LEFT(MAXX(B,[Year]),4)-COUNTROWS(B)+1 
RETURN IF(COUNTAX(A,[Team])>0,TRUE(),IF(C=TRUE()&&COUNTROWS(B)>1,TRUE(),FALSE()))

vxinruzhumsft_0-1670491809123.png

 

Is this the output you want?

 

 

 

Best Regards,

Yolo Zhu

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

lbendlin
Super User
Super User

Please provide the sample data in usable format, not as a screenshot.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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