I am using these commands as a dimension to filter my database according to the columns 'Sides' and 'Name0.value'. It worked perfectly in the count chart, but in the names table, I receive an error "Aggregations and metric expressions are not allowed in this expression."
CASE
WHEN COUNT(DISTINCT CASE WHEN Sides IN ('left', 'both') THEN Name0.value ELSE NULL END) >
COUNT(DISTINCT CASE WHEN Sides IN ('right', 'both') THEN Name0.value ELSE NULL END)
THEN COUNT(DISTINCT CASE WHEN Sides IN ('left', 'both') THEN Name0.value ELSE NULL END)
WHEN COUNT(DISTINCT CASE WHEN Sides IN ('right', 'both') THEN Name0.value ELSE NULL END) >
COUNT(DISTINCT CASE WHEN Sides IN ('left', 'both') THEN Name0.value ELSE NULL END)
THEN COUNT(DISTINCT CASE WHEN Sides IN ('right', 'both') THEN Name0.value ELSE NULL END)
ELSE COUNT(DISTINCT CASE WHEN Sides IN ('right', 'both') THEN Name0.value ELSE NULL END)
END
How can I solve this problem?
User | Count |
---|---|
3 | |
2 | |
2 | |
1 | |
1 |