Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

need to avg a field even though there is nothing selected

Hi,

I have a chart and I need to show REGION values if there is nothing selected in PAIS listbox

Captura.PNG

and then if there is a selection need to show the selected field values.

I´m using this, but doesnt work.

if(PAIS <> '' , avg({$<PAIS ={[REGION]} , PRODUCTO = {[wwww]}>} MS%), avg({$<PRODUCTO = {[wwww]}>} MS%))

Any ideas?

Thanks

Adrian

1 Solution

Accepted Solutions
sunny_talwar

Try this:

If(GetSelectedCount(PAIS) = 0, Avg({<PAIS = {'REGION'}, PRODUCTO = {'wwww'}>} MS%), Avg({<PRODUCTO = {'wwww'}>} MS%))

View solution in original post

2 Replies
sunny_talwar

Try this:

If(GetSelectedCount(PAIS) = 0, Avg({<PAIS = {'REGION'}, PRODUCTO = {'wwww'}>} MS%), Avg({<PRODUCTO = {'wwww'}>} MS%))

Not applicable
Author

Thank you so much!!