Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

parul2909
New Contributor

QLiksense - Group By

Hi,

I have data as below

   

QuarterMonthTarget
Q1110000
Q1210000
Q1310000
Q2420000
Q3520000
Q46

20000

In Qliksense frontend, I want to show the monthly values as shown in table

But quarterly value for Q1 should be 10000, not the sum of all three(30000)

and for Q2 it should be 20000, and not sum of all three (60000)

When user selects on the  quarter filter, instead of sum of all three, only 10000 ( for Q1) and 20000 ( for Q2) should show in the chart.

WHat is the way to achieve this? Can an alternate dimesnion be added in the same chart ? and aggr fucntion be used to add another variable, quarterly target, ?

Please share the fucntion or way to achieve this

7 Replies
laurischarf
Contributor II

Re: QLiksense - Group By

I would add Avg(Target) as the measure in the chart.

parul2909
New Contributor

Re: QLiksense - Group By

Can you let me know the set analysis for the same

laurischarf
Contributor II

Re: QLiksense - Group By

Set analysis is to select specific data to include in a measure. If you simply want to show the average of Target, then make the measure:

=avg(Target)

If you need to reduce the data with set analysis, for example:

=avg({<Country={'USA'}>} Target)

parul2909
New Contributor

Re: QLiksense - Group By

Can you please let me know the set analysis as per the example I shared

On Mon, Apr 16, 2018, 12:52 AM Lauri Scharf <qcwebmaster@qlikview.com>

laurischarf
Contributor II

Re: QLiksense - Group By

I don't understand what you want to do with set analysis... What dimensions and measures does your chart have?

thiago_justen
Valued Contributor III

Re: QLiksense - Group By

May be this:

Aggr(Avg(Target),Quarter)

Thiago Justen Teixeira Gonçalves
WhatsApp: 24 98152-1675
Skype: justen.thiago
sasiparupudi1
Honored Contributor III

Re: QLiksense - Group By

I do not think you need a set analysis here.. may be change your expression something like this

IF(GetSelectedCount(Quater)>0,Aggr(Avg(Target),Quarter),sum(Target))

otherwise, pl provide a sample