Forum Discussion
LyonsBI_BRL
5 years agoHelper III
Grouping Values together in IF statement
I'm completely stuck on an IF statement that I need to create here for the following scenario The scenariio is I need to create a calculated column (that or if a measure would work better that'd wor...
Anonymous
5 years agoNot applicable
Hi LyonsBI_BRL ,
Here are the steps you can follow:
1. Create measure.
Flag =
var _table=SUMMARIZE(ALL('Query1'),[Segement Group],[of Units],"1",[MegaDeals_New])
var _max=MAXX(FILTER(_table,[1]=[MegaDeals_New]),[of Units])
return
IF(MAX([of Units])=_max,1,0)
2. Place the Flag in the Filter, set is =1, Apply filter.
3. Result.
Only one in the same group
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
LyonsBI_BRL
5 years agoHelper III
Anonymous
So I put together the
Flag =
var _table=SUMMARIZE(ALL('Query1'),[Segment Group],[[Units]]],"1",[MegaDeals_New])
var _max=MAXX(FILTER(_table,[1]=[MegaDeals_New]),[[Units]]])
return
IF(MAX([[ST Units]]])=_max,1,0)Though it wasn't seeming like it was grouping together when I placed the Flag Measure into the table. Instead it just took a huge amount of time and swtiched from being Flag = 1 to showing as 0 in the data card.
Am I missing something here?