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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Get Total Value Regardless Selection

Hi QV Expert!

I have this data:

Period CityScore
2010Jakarta12
2010New York30
2010Melbourne5
2010Madrid58
2010Tokyo15
2010Prague6
2011Jakarta22
2011New York29
2011Melbourne4
... and so on... and so on... and so on

I have a trouble here, please help me how to accomplish this:

  • X = Get AVERAGE VALUE of SCORE in a PERIOD from ALL CITIES regardless how many cities selected.

Thus, X will always 21 in selected period = 2010 even if selected city = Jakarta, Madrid

I have this formula, but it doesn't work.

=Avg({<Period={$(=GetFieldSelections(Period))}, City={$(=Concat{DISTINCT {1} City, ','})}>} Score)

Please help.

Thank you.

Attached 2 files I used to create the report:

  1. sample_online.xlsx (take a look at the hardcode sheet)
  2. test_sample_online.qvw (go to Report sheet)
1 Solution

Accepted Solutions
Sokkorn
Master
Master

Hi Adrian,

K.I.S.S

=Avg({$<City = >} Score)

Regards,

Sokkorn

View solution in original post

1 Reply
Sokkorn
Master
Master

Hi Adrian,

K.I.S.S

=Avg({$<City = >} Score)

Regards,

Sokkorn