Greg_Deckler
7 years agoCommunity Champion
Cthulhu
Why Cthulhu? Because the mental gymnastics required to figure this out nearly drove me insane. And because the exact reason you would need this measure is probably beyond the comprehension of mere mo...
AlexisOlson
2 years agoSuper User
I think I found a cleaner approach:
Local Group Index =
VAR _CurrIndex = MAX ( Cthulhu[Index] )
VAR _CurrGroup = MAX ( Cthulhu[Animal] )
VAR _LocalGroupStart =
CALCULATE (
MAX ( Cthulhu[Index] ),
ALLSELECTED ( Cthulhu ),
Cthulhu[Index] < _CurrIndex,
Cthulhu[Animal] <> _CurrGroup
)
VAR _LocalIndex = _CurrIndex - _LocalGroupStart
RETURN
_LocalIndex
- Greg_Deckler2 years agoCommunity Champion
I'll have to give them a try. The more modern version of Cthulhu can be found inside of Streaks! Streaks! - Microsoft Fabric Community
- AlexisOlson2 years agoSuper User
I've got a simplification for that problem now too. ๐
- MrsBuckley641 year agoNew Member
Hello, I am very new to Power Query, just started watching videos on how to use yesterday... I typed this in and I keep getting a Token Eof expected, I have tried to remove the Local Group Index part and still happens, please help, this is what I need to finish this sheet, thank you!
- AlexisOlson1 year agoSuper User
Power Query uses M, not DAX. It's a completely different language.
- MrsBuckley641 year agoNew Member
Ah.... well I feel slightly foolish.... will keep learning, thank you for responding!