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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

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
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors