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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
arsene49
Helper I
Helper I

DAX Column/Measure

Hello,

i'm looking for either column/measure - 
below is the data, i want to know who has won 3 consecutive matches.

 

ex. Batman has won 1 consecutive 3 matches (matchid=5,6,7)
Ozil has won 2 consecutive 3 matches
Rambo 0


expected output in visual - 

Batman - 1
Ozil - 2
Rambo - 0

 

Data - 

MatchIDNameResult

1Batman   L
2Batman   W
3Batman   W
4Batman   L
5Batman   W
6Batman   W
7Batman   W
8Batman   L
1Ozil   L
2Ozil   W
3Ozil   W
4Ozil   W
5Ozil   L
6Ozil   W
7Ozil   W
8Ozil   W
1Rambo   W
2Rambo   L
3Rambo   L
4Rambo   L
5Rambo   W
6Rambo   W
7Rambo   L
8Rambo   L
1 ACCEPTED SOLUTION
8 REPLIES 8
Ahmedx
Super User
Super User

You can also optimize the measure like this:

Screen Capture #764.png

Sample PBIX file attached
https://1drv.ms/u/s!AiUZ0Ws7G26RhmjJ_yFo7pNmkZA-?e=koDNaG

Thanks Ahmed for the logic.

i checked the logic but your logic is not working for couple of scenarois like if there are continiuos 4 Wins (it is counting as 2)

ex. for below data, it is showing count as 2 which is wrong. it should be 1

also it shows 4 when there are 6 continious W .instead it should show 2

 

1Batman   L
2Batman   W
3Batman   W
4Batman   L
5Batman   W
6Batman   W
7Batman   W
8Batman   W

Thanks much Ahmed for this refined logic.

 

this is not working for below scenario - 

if some has won 6/9 times continiously (WWWWWW), it still shows 1. instead it should show 2/3.

 

it would be great if you can accomodate this scenario in your formula. appreciate your help on this.

Thanks Ahmed. appreciate your help here.

Ahmedx
Super User
Super User

it is also possible to make a calculation without creating additional physical tables

Screen Capture #762.png

Sample PBIX file attached
https://1drv.ms/u/s!AiUZ0Ws7G26RhmdfULmtuu2pyhAV?e=lZbcDi

Ahmedx
Super User
Super User

1) You need to create an additional table, exactly like this:

1.png
2) write the measure like this:

2.png
Sample PBIX file attached
https://1drv.ms/u/s!AiUZ0Ws7G26RhmUKoNk-kkGvKSiU?e=kHyHrc

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.