Skip to main content

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Welcome to Qlik Community! Check out our new navigation! FIND OUT MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Count values of a Pivot table

Hi there,

I'd like some assistance with a pivot table, I've prepare the Doc attached as reference and I'll try to explain as much as I can. So, I have a column on a pivot table that displays either Passed or Failed depending on the result of another column on the same table, it works fine but I want to change the 'Total' line for that column to display "Failed" if there are 1 or more Failed status on the column. Then I also need to count how many Failed status appear on that column.


Screenshot below as reference:

Ex1.PNG

1 Solution

Accepted Solutions
sunny_talwar

See if the attached is what you wanted?

Capture.PNG

View solution in original post

5 Replies
sunny_talwar

See if the attached is what you wanted?

Capture.PNG

Not applicable
Author

Thanks Sunny,


It works fine and provides the desired result. Appreciate your help!!

Any chances for a little explanation? Specially the "MinString(Aggr"

sunny_talwar

MinString behaves like Min() function but it works on a text field. In your case there were two options: Passed and Failed and since F is smaller than P, MinString looked at all your rows and picked the lowest text to display for the total row.

Does this make sense?

Not applicable
Author

Makes sense, totally.

Definitely you attacked the problem with a different approach and found a simple solution. Thank you very much for your assistance, it helped me in more than 1 way.

meliball
Contributor
Contributor

Hi Sunny

I don´t understand your answer, what is it all this?

If(IF((SUM(C) / SUM(A))=0,'-',(SUM(C) / SUM(A)))>=0.95 or IsText(IF((SUM(C) / SUM(A))=0,'-',(SUM(C) / SUM(A)))), 1)

 

I have a similar problem. I need to count the number of companies, per country, when the result of the test expression is"wrong"

I am doing 

Aggr(Count(distinct([EO Name])), [EO Country])

and it works perfectly to count the number of companies (EO Name) per country

But when I want to count the number of companies that failed the test per country, I do:

Aggr(Count(If([Pass test]='wrong', 1)), [EO Name], [EO Country])

And it just retrieve zeros, which is incorrect

 

what is wrong with my code?
thanks for your help