Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
tracycrown
Creator III
Creator III

Counting issue

Dear Sir/Madam

Can someone advise the following ASAP :

1. Why there is a 1 under Strongly Disagree column (2nd last row) ?

2. How to delete the 2nd last row and KEEP the Strongly Disagree column without data ?.

Thank you

Tracy

1 Solution

Accepted Solutions
sunny_talwar

How about creating 5 expression after removing Answer as one of the dimension. See the bottom chart

Capture.PNG

View solution in original post

13 Replies
qlikviewwizard
Master II
Master II

Hi,

Please check this.

//Calendar

Let vLYear=(year(date(today(0)))-1);

LOAD * INLINE [

    Month, Monthname, Qno

    1, Jan, Q1

    2, Feb, Q1

    3, Mar, Q1

    4, Apr, Q2

    5, May, Q2

    6, Jun, Q2

    7, Jul, Q3

    8, Aug, Q3

    9, Sep, Q3

   10, Oct, Q4

   11, Nov, Q4

   12, Dec, Q4

];

Response:

CrossTable(Qno, Data)

LOAD *

FROM

[Test-1.xls]

(biff, embedded labels, table is Response$);

Answer:

LOAD Code as Badge,

     Answer

FROM

[Test-1.xls]

(biff, embedded labels, table is Answer$);

LOAD Dimension,

     Qno

FROM

[Test-1.xls]

(biff, embedded labels, table is Questionnaire$);

Capture.PNG

tracycrown
Creator III
Creator III
Author

Dear Mr Arjun Rao

Thank you for your quick response.

Sorry to say that the answer is not correct. I am trying to count number of people who voted Strongly Agree, Agree ....

so sum(Data) is not correct, please advise

Correct Answer for Q1 should be Neutral (6), Agree (6)

Thank you

Tracy

sunny_talwar

How about creating 5 expression after removing Answer as one of the dimension. See the bottom chart

Capture.PNG

tracycrown
Creator III
Creator III
Author

Dear Sunny Talwar

Yes, your answer is correct but is there a better way as too many coding in the expression ?.

Thank you

Tracy

tracycrown
Creator III
Creator III
Author

Dear Sunny Talwar

Can you advise why my method created a 1 in Strongly Disagree column ?

Thank You

Tracy

sunny_talwar

There might be... but it won't be clean and will need a lot of trial and error.... I have always had problems with this kind of thing in pivot table... why do you not like this again? a lot of coding? just added set analysis.... that should not be a lot of coding or are you saying your expressions are much more complicated then this?

sunny_talwar

Picking it from this Answer tab of the Excel sheet

Capture.PNG

tracycrown
Creator III
Creator III
Author

Dear Sunny Talwar

But nobody voted Strongly Disagree, so the count(Code) should be ZERO instead of 1, isn't it ?

Thank you

Tracy

sunny_talwar

Right, but you are counting Code... which has a value for Strongly Disagree... but this fall under null dimension (at the bottom)