Forum Discussion
Anonymous
5 years agoNot applicable
Aggregation/Filtering obstacles and how to overcome it
Hello Dear Community! I have some data on online games. Per log-in session the customers can play for example only Tennis, or Tennis and Football or 10 different sports if they feel like it. Per ...
- 5 years ago
Anonymous
🤣🤣🤣
OKay, then you need to add a column
distCountCol = CALCULATE(DISTINCTCOUNT(Table1[game_name_en]),ALLEXCEPT(Table1,Table1[login_session_number]))then, create the measure
distCount2 = IF( CALCULATE(MAX(Table1[distCountCol]),ALLEXCEPT(Table1,Table1[customer_number]))<>1,3,1)MeasureTest2 = var _selgamename=SELECTEDVALUE(Table2[game_name_en]) var _distCount=CALCULATE(DISTINCTCOUNT(Table1[game_name_en]),ALLEXCEPT(Table1,Table1[login_session_number])) var _min=CALCULATE(MIN(Table1[login_date]),FILTER(ALL(Table1),Table1[customer_number]=MIN(Table1[customer_number])&&Table1[game_name_en]=_selgamename&&[distCount2]=1)) return IF(MIN(Table1[login_date])=_min&&MIN(Table1[game_name_en])=_selgamename,1,0)then put the MeasureTest2 into Filters on this visual
result
Best Regards,
Community Support Team _Tang
If this post helps, please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
5 years agoNot applicable
v-xiaotang I am sorry for updating this so late, but can we throw in the additional if sentence on the win/loss column, see my update. Thanks a whole lot!
v-xiaotang
Community Support
5 years agoAnonymous
🤣🤣🤣
OKay, then you need to add a column
distCountCol = CALCULATE(DISTINCTCOUNT(Table1[game_name_en]),ALLEXCEPT(Table1,Table1[login_session_number]))
then, create the measure
distCount2 =
IF( CALCULATE(MAX(Table1[distCountCol]),ALLEXCEPT(Table1,Table1[customer_number]))<>1,3,1)MeasureTest2 =
var _selgamename=SELECTEDVALUE(Table2[game_name_en])
var _distCount=CALCULATE(DISTINCTCOUNT(Table1[game_name_en]),ALLEXCEPT(Table1,Table1[login_session_number]))
var _min=CALCULATE(MIN(Table1[login_date]),FILTER(ALL(Table1),Table1[customer_number]=MIN(Table1[customer_number])&&Table1[game_name_en]=_selgamename&&[distCount2]=1))
return IF(MIN(Table1[login_date])=_min&&MIN(Table1[game_name_en])=_selgamename,1,0)
then put the MeasureTest2 into Filters on this visual
result
Best Regards,
Community Support Team _Tang
If this post helps, please consider Accept it as the solution to help the other members find it more quickly.