Having trouble with the ANY() function.
ANY(Table[Column]) does not seem to be returning a random value, but the first value in the list every time. Same thing with ANY(SELECT(Table[Column], TRUE)).
Am I reading the documentation wrong? It seems like either of these expressions should return a random value from the list.
ANY expression always returns the first value in the list. Provided you want to return a random value from the list, you can use this expression:
INDEX(SPLIT(SELECT(TableName[ColumnName],TRUE),","),RANDBETWEEN(1, COUNT(TableName[ColumnName])))
ANY() doesnโt guarantee which item it returns. The current implementation happens to return the first item in the list.
Thanks @Levent_KULACOGLU , I will give this a try
@Levent_KULACOGLU The SPLIT is not needed because the SELECT expression produces the list already.
Thanks @Aleksi_Alkio
I realized that later
User | Count |
---|---|
40 | |
34 | |
29 | |
23 | |
17 |