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: 
gomeri
Partner - Creator
Partner - Creator

Addition of column name on the x-axis of the histogram

Hi all,

I have a question for you.

I have an istogram with a dimension containing measure and four measures containing four set expressions.

How can I add the legend values on the x-axis?

gomeri_1-1721920729216.png

 

 

Thank you for help

 

Giovanni O. D.
Labels (1)
1 Solution

Accepted Solutions
SterreKapteijns
Partner - Contributor III
Partner - Contributor III

I do not fully understand what you mean. Do you mean you want the set expression as the label in the histogram, and in the legend? If so, you can just change the name of the measure (not the expression itself) and put it in between quotes?

View solution in original post

4 Replies
SterreKapteijns
Partner - Contributor III
Partner - Contributor III

You can alter the legend- and labels settings under 'Appearance', then 'x-axis'  or 'y-axis' 

gomeri
Partner - Creator
Partner - Creator
Author

Hi @SterreKapteijns,

you solution is good, but i have six distinct set expression with if conditions in measures.

With set expression in measures i can't have names of measures in legend, I need to find a tip and trick to gave name to measurs.

gomeri_0-1722325804594.png

 

In my app the Bar Chart object have:

1 Dimensions:

=Valuelist('Measure')

4 Measures (for simplicity i write only first 2 because sintaxis is the same):

- Measure 1: 

if(GetObjectDimension()='Hours', avg({<[Category] = {'A'}}>} Value1)/(Value2)
    ,
    avg({<[Category] = {'A'}}>} Value2)*(Value2))

- Mesure 2:

if(GetObjectDimension()='Hours', avg({<[Category] = {'B'}}>} Value1)/(Value2)
    ,
    avg({<[Category] = {'B'}}>} Value2)*(Value2))

 

How can I give names for my set expressions to visualize it in the legend of my chart?

Thanks

Giovanni O. D.
SterreKapteijns
Partner - Contributor III
Partner - Contributor III

I do not fully understand what you mean. Do you mean you want the set expression as the label in the histogram, and in the legend? If so, you can just change the name of the measure (not the expression itself) and put it in between quotes?

gomeri
Partner - Creator
Partner - Creator
Author

Yes, i want the set expression as the label in the histogram and in the legend. If I put the name of measure in quote it doesn't work because my dimension contain a index of function valuelist() and not specific categories. 

I find a usefull workaround for this, I use dual() function in expression of my chart. So, now every column has his name of measure and his calculated measure.

Thanks for help

Giovanni O. D.