Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
janturon
Contributor III
Contributor III

New Expression - % average of % expression values based on Dimension

DimensionsExpressions
GroupPlaceCity%OPAvg%Op_Group
J I NR014Horná Kráľová27,00%27,47%
J I NR015Tlmače28,80%27,47%
J I NR019Jarok30,18%27,47%
J I NR020Mojmírovce24,21%27,47%
J I NR022Hronské Kľačany26,56%27,47%
J I NR025Čeľadice30,28%27,47%
J I NR027Hájske25,77%27,47%
J I NR032Jedľové Kostoľany28,23%27,47%
J I NR034Žitavany29,13%27,47%
J I NR129Dolné Štitáre25,05%27,47%
J I NR137Lovce26,98%27,47%
J I NRTotal-27,12% 
J II NR012Báb18,39%24,93%
J II NR013Báb28,45%24,93%
J II NR018Lužianky25,76%24,93%
J II NR125Podhorany Bádice27,10%24,93%

 

Hello, I have table see above....

 

%OP is this expression:

= (Sum({<Rok={$(vsuc)},Mesiac={$(vmaxmes)},UCET_SYN={'604'}>}MDD)
-
Sum({<Rok={$(vsuc)},Mesiac={$(vmaxmes)},UCET_SYN={'504'}>}MDD))
/
Sum({<Rok={$(vsuc)},Mesiac={$(vmaxmes)},UCET_SYN={'504'}>}MDD)

 

I need help with create expression  Avg%Op_Group.

It means average %OP for Dimension "Group".

Labels (1)
1 Solution

Accepted Solutions
sunny_talwar

May be try this

=Avg(TOTAL <Group> Aggr(
(Sum({<Rok={$(vsuc)},Mesiac={$(vmaxmes)},UCET_SYN={'604'}>}MDD)
-
Sum({<Rok={$(vsuc)},Mesiac={$(vmaxmes)},UCET_SYN={'504'}>}MDD))
/
Sum({<Rok={$(vsuc)},Mesiac={$(vmaxmes)},UCET_SYN={'504'}>}MDD)

, Group, Place, City))

View solution in original post

2 Replies
sunny_talwar

May be try this

=Avg(TOTAL <Group> Aggr(
(Sum({<Rok={$(vsuc)},Mesiac={$(vmaxmes)},UCET_SYN={'604'}>}MDD)
-
Sum({<Rok={$(vsuc)},Mesiac={$(vmaxmes)},UCET_SYN={'504'}>}MDD))
/
Sum({<Rok={$(vsuc)},Mesiac={$(vmaxmes)},UCET_SYN={'504'}>}MDD)

, Group, Place, City))
janturon
Contributor III
Contributor III
Author

thank you. 🙂