Forum Discussion
twowaysyellow
3 years agoFrequent Visitor
Count unique/distinct values over multiple columns
How can I count distinct values over multiple columns? This is probably a really simple thing, but I haven't been able to find an answer I am managing to apply. Probably due to my lack of skill. ...
- 3 years ago
try this measure,
Distinct count = VAR _val1 = VALUES(Tablename[Value 1]) VAR _val2 = VALUES(Tablename[Value 2]) VAR _union = DISTINCT(UNION(_val1,_val2)) RETURN COUNTROWS(_union)Thanks,
Arul
Arul
3 years agoSuper User
try this measure,
Distinct count =
VAR _val1 = VALUES(Tablename[Value 1])
VAR _val2 = VALUES(Tablename[Value 2])
VAR _union = DISTINCT(UNION(_val1,_val2))
RETURN COUNTROWS(_union)
Thanks,
Arul