Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
lakshmittpd
Contributor
Contributor

Distinct count

Hi All I have the below scenario

Key Column 1 Column 2 Column 3 Column 4
1 A   A E
1 B C B D
1 C E C  
1 D      

 

I want to find distinct count of coulmn 1,2,3,4 which should give 5

please help me with the formula.

Labels (5)
2 Replies
Mark_Little
Luminary
Luminary

Hi @lakshmittpd 

I don't think you can count distinct values across multiple dimensions, that i know of anyhow.

If i need to this i would be looking to do something in script.

You would want to look at something like the crosstable function

https://help.qlik.com/en-US/sense/February2022/Subsystems/Hub/Content/Sense_Hub/Scripting/ScriptPref...

Then with all the values in a single dimension you can count distinct

vinieme12
Champion III
Champion III

Transpose your table,  to turn columns to rows as  below

temp:
CrossTable(Col, ColValues, 1)
load * inline [
Key,Column1,Column2,Column3,Column4
1,A,,A,E
1,B,C,B,D
1,C,E,C,
];

 

Then in Chart use

Dimension = Key

Measure = Count(Distinct ColValues)

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.