Streaks with DAX

k-real

New Member
Joined
Jul 21, 2005
Messages
32
I am trying to calculate streaks, namely:
- Current Streak, e.g. +3 / -2; or W3 / L2
- Last Winning Streak
- Last Losing Streak
- Longest Winning Streak
- Longest Losing Streak

What I have is a GameSequenceID field that provides an order of games, allowing for multiple games to be played on the same day (essentially, a concatenation of a Date field and a GameNum field). Having linked tables (Players to Teams and Teams to Games), I was able to obtain a result in the WinValidation column with the following formula:
=IF(RELATED(factGameTeams[Result]="Win",1,0)
Same for "Loss" column with "Loss" inserted the formula above.
Now, where I am stuck is the Win Streak column. It feels like it needs an EARLIER function in there, but I just can't wrap my brain around it! Any suggestions?
https://drive.google.com/open?id=0ByH-xaEGJ3BERmg4cW5sNTZNMnc
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number

Forum statistics

Threads
1,224,112
Messages
6,176,442
Members
452,728
Latest member
mihael546

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top