Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Highlighted
Not applicable

Text in chart avg value

Hello,

I have an average line for a chart and would like to show the value as 'Text in chart' in the presentation tab.  For some reason though, i am generating an error with this syntax.

=Avg(Sum({$<Measure={1}, ProductId = {1}, Month = {1}>}Qty))

I do not want to use the 'y=' show eqution to display the value.  Is there any other way of doing this??

Thank You

Tags (5)
1 Solution

Accepted Solutions
Partner
Partner

Re: Text in chart avg value

You have to use :

Avg({$<Measure={1}, ProductId = {1}, Month = {1}>}Qty)


or


Sum({$<Measure={1}, ProductId = {1}, Month = {1}>}Qty)

/

Count({$<Measure={1}, ProductId = {1}, Month = {1}>} DISTINCT ID)

3 Replies
Partner
Partner

Re: Text in chart avg value

You have to use :

Avg({$<Measure={1}, ProductId = {1}, Month = {1}>}Qty)


or


Sum({$<Measure={1}, ProductId = {1}, Month = {1}>}Qty)

/

Count({$<Measure={1}, ProductId = {1}, Month = {1}>} DISTINCT ID)

michielvandegoo
Valued Contributor

Re: Text in chart avg value

replace sum with avg in your expression


avg({$<Measure={1}, ProductId = {1}, Month = {1}>}Qty)

Not applicable

Re: Text in chart avg value

So bc my expression was: Sum({$<Measure={1}, ProductId = {1}, Month = {1}>}Qty),

Avg({$<Measure={1}, ProductId = {1}, Month = {1}>}Qty) rendered a very small value that was wrong.



So, I wound up going with this:


Sum({$<Measure={1}, ProductId = {1}, Month = {1}>}Qty)

/

Count({$<Measure={1}, ProductId = {1}, Month = {1}>} DISTINCT ID)


Thank you both