Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Count of Rows

Hi everynoe,

I need to display count of rows of pivot table in title of same chart. Please suggest how to achieve this with and without macros.

Many thanks,

Murali

1 Solution

Accepted Solutions
jagan
Luminary Alumni
Luminary Alumni

Hi Murali,

Please find attached file for solution.  Hope it helps you.

Regards,

Jagan.

View solution in original post

7 Replies
amars
Specialist
Specialist

Hi,

NoOfRows( ['TableName ' ] ) in the Caption

Thanks

Amar

jagan
Luminary Alumni
Luminary Alumni

Hi Murali,

Please find attached file for solution.  Hope it helps you.

Regards,

Jagan.

Not applicable
Author

Thanks a lot. Aggregation function gives right result.

/Murali

Not applicable
Author

Hi Jagan,

The above test.qvw is showing the no. of rows at lowest level i.e. Item Type. But in Pivot Table if we are at Country level the expression should show only 4 (Country wise no. of rows)  and if we expend the table at Item Type level then it should show 10(Item Type wise no. of rows).

Is is possible to show like this.

Thanks & Regards

Apurva

jagan
Luminary Alumni
Luminary Alumni

Hi Apurva,

Try this expression

='Total Rows =' & If(Dimensionality()= 2, Sum(Aggr(1, Country, [Item Type])), Sum(Aggr(1, Country)))

Hope it helps you.

Regards,

Jagan.

Not applicable
Author

Hi Jagan,

its not working it is showing only 4 for both dimensions. Please try in your application and send to me.

Thanks & Regards

Apurva

jagan
Luminary Alumni
Luminary Alumni

Hi Apurva,

The Dimensionality() returns empty value for Total Row, and also for Pivot table there is no option for "Sum of Rows" in Expression tab.  So, this may not work for Pivot table.  So, there is no way to track the dimension level.  But we can do this by show and hide dimension buttons and track the dimension level.  PFA file.

Regards,

Jagan.