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

How to indicate last row in pivot table chart type? Version 2

Hello guys,

Last time I posted to find a way to get the last row in a pivot table chart type as shown below

I got an answer in which the expression is as follows:

     if(rank(total RowNo(total)) = 1, 'L')

That definitely was the correct expression but it was silly of me that I failed to notice this particular condition; while it correctly displayed the last row in the pivot table for a selected country, but when you select multiple country it will still indicate the last row of the pivot table and this is quite not the result I desire.

What I wanted is to show it like this

How do I tweak the expression so that it will display at the last row of each country selected and displayed in the pivot table? As pictured above?

Thank you for your kind attention guys

1 Solution

Accepted Solutions
Not applicable
Author

Please check this one:

=If(Country <> Below(TOTAL Country,1) and not IsNull(Country), 'L', '-')

View solution in original post

12 Replies
Not applicable
Author

Hi,

if you need inter record, try:

if(Below(Country)<>Country,'Last')

Not applicable
Author

Hello Dariusz,

Thank you for your kind attention, unfortunately this is the result that I got

Almost there but not quite yet. Do you know of any other way?

Again thank you for your time answer my question

preminqlik
Specialist II
Specialist II

try this ,
if(row(total)=noofrows(),'Last',null())

preminqlik
Specialist II
Specialist II

sorry try this

if(rowno(total)=noofrows(total),'Last','')

Not applicable
Author

Hello Prem,

Thank you for the suggestion but unfortunately this is the result

In which is similar to the result I got in the first place.

Do you have any other suggestion to tackle this problem?

Thank you so much for your kind attention

jagan
Luminary Alumni
Luminary Alumni

Hi,

Try like this

=If(Country <> Below(TOTAL Country ,1), 'Last', '-')

Replace Country with your Country Dimension name.

Regards,

Jagan.

Not applicable
Author

Hello Jagan,

Thank you very much for your suggestion but this is the result that I get

The result is almost as intended, we just need to figure out to show only Last on the last row of the Country only and not Country / Year last row.

Do you think there is any other way to solve this?

Thank you so much for your time taken to answer my question.

preminqlik
Specialist II
Specialist II

hi try this

if(rowno()=count(total <Country>aggr(rowno(),Country,PostingYear,PostingMonth,Days)),'Last','')

jagan
Luminary Alumni
Luminary Alumni

Hi,

It is working for my sample data.  Please refer attached file.

Regards,

Jagan.