Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

jsnova0101
New Contributor II

calculation issue

I have the following results  (pivot table)
                              State A                         State B
Company A          avg(DurationDays)
         

--
                              State A                         State B
Company A               5                                   4
Compnay B               3                                  12


Now they want to get  a horizontal summary may be in seperate table

They Want Company A 9 days
                    Company B 15 days

tried things like aggr(avg(DurationDays),StateDescription) with the dimension company, but then i get null values

how to fix this ?

Tags (2)
1 Solution

Accepted Solutions
MVP
MVP

Re: calculation issue

Use Company as dimension

Expression

Sum(Aggr(Avg(DurationDays), Company, State))

4 Replies

Re: calculation issue

What do you want to do? Sum the averages or average the averages or something else?

If you want the sum of averages try something like this: Sum(aggr(avg(DurationDays),CompanyNameDimensionHere,StateDescription))


talk is cheap, supply exceeds demand
sushil353
Honored Contributor II

Re: calculation issue

Hi,

If you are using a straight table then try :

sum(aggr(avg(DurationDays),Company))

Not applicable

Re: calculation issue

Can you plz elaborate little more

MVP
MVP

Re: calculation issue

Use Company as dimension

Expression

Sum(Aggr(Avg(DurationDays), Company, State))

Community Browser