Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Highlighted
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

Tags (3)
1 Solution

Accepted Solutions
Not applicable

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

Please check this one:

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

12 Replies
Not applicable

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

Hi,

if you need inter record, try:

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

Not applicable

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

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
Valued Contributor II

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

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

preminqlik
Valued Contributor II

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

sorry try this

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

Not applicable

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

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

MVP & Luminary
MVP & Luminary

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

Hi,

Try like this

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

Replace Country with your Country Dimension name.

Regards,

Jagan.

Not applicable

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

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
Valued Contributor II

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

hi try this

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

MVP & Luminary
MVP & Luminary

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

Hi,

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

Regards,

Jagan.