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: 
Not applicable

Is it possible to show total row count of a table outside of that table?

Hi All,

Is it possible to show total row count of a table outside of that table?

If yes, how can I do that?

I want to show total number of row count in a text box. Can someone write the formula for that?

Help will be highly appreciated.

Thanks,

TA

10 Replies
Not applicable
Author

you can still create copy of that table and remove dimension

jonathandienst
Partner - Champion III
Partner - Champion III

TA

You need an Aggr() expresssion in your text box in the form:

     =Sum(Aggr( <your table expression> , <table dimension 1>, <table dimension 2>, ...))

For example

    =Sum(Aggr(Sum(Amount), Region, Month))

You can format the result with the Num() function, for example:

    =Num(Sum(Aggr(Sum(Amount), Region, Month)), '# ##0', ,., ' ')

Hope that helps

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Not applicable
Author

It is helpful. But why cant I use NumericCount/TextcCount of a field  to find the total number or recrods?

Thanks,

Not applicable
Author

Like Jonathan says...

Count of chart rows depends on the dimension You use in that table

So if you want to calculate row count outside the table you need to use function aggr with the same dimension as in the table

Not applicable
Author

Can I use more than one dimension to get the total number of records outside the table?

I have used count, numeric count etc but no luck so far.

Not applicable
Author

...read Jonathan message again...

carefully:)

or send us sample qvw file

Not applicable
Author

Hi Pari Pari,

First of all your name is gerat....its secret for my family.

Second of all...

I read Jonathan message, but could not follow it. Here are my dimensions and expression which I want to use in order to get the total number or records for.

  • AU ID - Unique Id
  • First Name
  • Last Name

and here are my expressions (I could not get the right result becasue of expressions may be, because I am using an if condition in my expression)

  • =If(Sum ([ANON PV 1WK])>(vANONPVLastWeekHL2) And

(Sum ([ANON PV 4WKS])>(vANONPVLast4WeeksHL2)And

(Sum ([ANON SM HPW 1WK])>(vAONONHPWLastWeekHL2) And

(Sum ([ANON SM HPW 4WKS])>(vAONONHPWLast4WeeksHL2))))

,Sum ([ANON PV 1WK]))

  • =If(Sum ([ANON PV 1WK])>(vANONPVLastWeekHL2) And

(Sum ([ANON PV 4WKS])>(vANONPVLast4WeeksHL2)And

(Sum ([ANON SM HPW 1WK])>(vAONONHPWLastWeekHL2) And

(Sum ([ANON SM HPW 4WKS])>(vAONONHPWLast4WeeksHL2))))

,Sum ([ANON PV 4WKS]))

  • =If(Sum ([ANON PV 1WK])>(vANONPVLastWeekHL2) And

(Sum ([ANON PV 4WKS])>(vANONPVLast4WeeksHL2)And

(Sum ([ANON SM HPW 1WK])>(vAONONHPWLastWeekHL2) And

(Sum ([ANON SM HPW 4WKS])>(vAONONHPWLast4WeeksHL2))))

,Sum ([ANON SM HPW 1WK]))

  • =If(Sum ([ANON PV 1WK])>(vANONPVLastWeekHL2) And

(Sum ([ANON PV 4WKS])>(vANONPVLast4WeeksHL2)And

(Sum ([ANON SM HPW 1WK])>(vAONONHPWLastWeekHL2) And

(Sum ([ANON SM HPW 4WKS])>(vAONONHPWLast4WeeksHL2))))

,Sum ([ANON SM HPW 4WKS]))

Can you write a Aggr function statement which can give me the total number of records for these dimensions and experssion?

Thanks,

TA

Not applicable
Author

Hi,

If there are more than one expressions in a table, then how can I use them to find out the total number or records?

Do I have to use all of them or I can just one of them along with dimensions?

Can I just use one dimension e.g KEY instead of all dimensions?

Or I have attahced a qvw which has two types of expression one with IF logic and one with SET.

I want to show total number or records for both of them seperately. For IF logic expression is showing the correct result but SET not. Can you please update this QVW with show the exact number of records for both types of expressions?

Thanks,

TA

Not applicable
Author

Hi,

Did you figure out a way to get the physical number of rows? I am trying to achieve the same thing and none of the recommendations really helped. Appreciate if you can help me if you figured out a way.

Thanks