Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
Coming your way, the Qlik Data Revolution Virtual Summit. October 27-29. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Creator
Creator

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.

3 Replies
Highlighted
MVP & Luminary
MVP & Luminary

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

- Marcus

Highlighted
Creator
Creator

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')

Highlighted
MVP & Luminary
MVP & Luminary

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