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

dynamic measure label in bar chart

Hi All,

in bar chart i am using month as a dim and sum(sales) as expression.

in expression label i want to write one more measure for display like ='Sales='&max(sales)&;avg sales='&avg(sales)

when mouse-hover then it should display data like max Sales=100;avg sales=50  and as well sum(sales) value. 

 

Note:if i use 2 expressions then i am able to achieve this but i want to implement with single measure.

Labels (3)
3 Replies
marcus_sommer

Try: = 'Sales=' & num(max(sales), 'FormatPattern') & ';avg sales=' & num(avg(sales), 'FormatPattern')

- Marcus

anat
Master
Master
Author

Hi Marcus,

 

Thanks for reply,this part is working .but its giving same values for all the months.

in bar chart i am using monthcol as dim ,so i wan to distribute the data based on monthcol.

so when i try to use below query nothing is coming:

 = 'Sales=' & num(aggr(max(sales),monthcol), '0') & ';avg sales=' & num(aggr(avg(sales),monthcol), '0')

marcus_sommer

Calculations within labels, titles, variables and so on have no dimensionality and are therefore calculated on a global level.

Although the fact that's in general possible to create such visualization in labels or similar with aggr() - whereby it would need an outer aggregation with concat() too and you would also need to add the month-values and num() and some kind of description respectively layout/format to ensure that such "handpainted" table would be readable - it's IMO not sensible.

If you want to provide these information just use a table-chart for it.

- Marcus