Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Count Row Number

Hey Guys,

I am trying to accomplish the below. I have used rowno(Total) for an expression but that doesn't work b/c then it shows all records even if expression1 equals 0. Expression1 is a count of all names with criteria that needs to met. So, I only want to show a record when expression1 equals 1.

RowNameExpression1
1Name11
2Name21


This expression almost works

=if([Count]=1,
rangesum(above(total $(ecount),0,2000))
)

Two things are wrong 1- it still shows when expression1=0 and 2 - it takes a long time to calc.

It is however adding all the records above where expression1=1.

3 Replies
suniljain
Master
Master

Dear Kristen,

You Can Use Following Logic at Script Level.

Exp1:

Load *,

Count(Expression1) as Exp1_Count

From *.qvd;

Exp2:

Load

If(Exp1_Count = 1, ,) as Result

Resident Exp1

Not applicable
Author

Thanks for your response Sunil.

Unfortantely I can't count on the script side. I have to do it on design side. Any ideas how to do that?

Not applicable
Author

Difficult to say without seeing the data and expression but if Expression 1 is a boolean you could try something like:

=aggr(sum(Expression1),Name)