Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Announcements
Announcement: Certain actions are currently causing a Page Not Found error. This is a known issue and we are working with the platform vendor to investigate and resolve it.
Highlighted
ketanvaria
New Contributor III

Count Unpivot Table (Distinct does not give right results)

I have an original table with 3 records.

Original TableQuestion AQuestion B
1ExpertExpert
2BasicBasic
3ExpertNo Knowledge 

 

So A simple KPI count function gives me the answer 3 (which is correct!)

I have had to unpivot the table to do some more analysis 

UNPIVOT TABLE  
RecordQuestionSkill
1AExpert
2ABasic
3AExpert
4BExpert
5BBasic
6BNo Knowledge 

 

So A simple KPI count function gives me the answer 6 (which is incorrect!)

I tried DISTINCT COUNT function on Question but got the result 2 (which is incorrect!)

What function do I use to get the answer 3? I don't want to have 2 table so want to use the Unpivot table throughout. 

 

Labels (2)
1 Reply
Partner
Partner

Re: Count Unpivot Table (Distinct does not give right results)

You'll have to include the recno from the original table in your unpivot table. I guess you have some kind of a participant_id, the person who filled in the two questions? You should use a distinct count on that field.

--
kind regards
Jan