Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to rename column label?

Hi,

Is it possible to rename column legend?

For example, in the bar chart attached, i would like to be able to rename the last column legend.

Thanks.

7 Replies
Not applicable
Author

Not sure if this is what you want, but you can edit the dimension Product to make it a calculated dimension.

For instance


=if(Product='Product6', 'Other name',Product)


Of course you can use a variable or an expression that results in a string instead of 'Other name'.

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

Mark,

Great suggestion!

-Rob

Not applicable
Author

Ok. But I would like to apply this renaming to the last column, whatever its content is (not only for "Product6").

For instance, I already tried to use the "rowno()" function to identify the last column (within the same kind of calculated dimension you proposed) but that's not working (the row identification is certainly made after the column display).

The idea behind is that i would like to do some kind of "Others" column to aggregate the remaining total in the last column when the max visible number of rows is limited. I know there is a way with Aggr() function but the problem is that using Aggr() in calculated dimension prevent to sort values correctly in chart. And I need to keep the ability to sort values.

Not applicable
Author

hi,

you can use the following

=if(Product=fieldvalue('Product',fieldvaluecount('Product')),'namechange',Product)

as a calculated dimension in your chart.

thanks

Not applicable
Author

Hi,

That's interesting but I need to have the last column renamed. With columns sorted descending, this renames 'Product6' but not the last one which is 'Product4' here.

Not applicable
Author

hi,

what u can do first is find min(Sales) as minimumsales in your script and use the following

if(Sales=minimumsales , 'namechange',Product)

i think this should work fine now

thanks

Not applicable
Author

hi,

what u can do first is find min(Sales) as minimumsales in your script and use the following

if(Sales=minimumsales , 'namechange',Product) as a calculated dimension in your chart

i think this should work fine now

thanks