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
I tried the solution you posted last Friday
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)However when I placed it into the table, it actually cleared everything and didn't display anything. Does it Matter if it's Summarize of Segment Group or can it also be Summarize of Business Type or Organization (the name of the Company)
Thanks!