I have a table like this:
a
a
a
b
b
c
Is it possible to display such a list using a list-type virtual column in the same table?
a 3 50%
b 2 33%
c 1 16%
p.s. sorry for google translator)
Solved! Go to Solution.
Ideally, youโd have a separate table that contains only the distinct values, then you could use virtual columns to gather and present the desired stats.
If not that, add virtual columns for the desired stats to the existing table, then youโll want a slice of the original table that uses a row filter expression similar to this to include only one row per distinct column value:
(
[_ROWNUMBER]
= MIN(
SELECT(
table[_ROWNUMBER],
([column] = [_THISROW].[column])
)
)
)
where table
is the name of the table, and column
is the name of the column containing the values you want to present.
Ideally, youโd have a separate table that contains only the distinct values, then you could use virtual columns to gather and present the desired stats.
If not that, add virtual columns for the desired stats to the existing table, then youโll want a slice of the original table that uses a row filter expression similar to this to include only one row per distinct column value:
(
[_ROWNUMBER]
= MIN(
SELECT(
table[_ROWNUMBER],
([column] = [_THISROW].[column])
)
)
)
where table
is the name of the table, and column
is the name of the column containing the values you want to present.
Thank you very much!
User | Count |
---|---|
61 | |
25 | |
14 | |
11 | |
6 |