New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

New Contributor

QLiksense - Group By

Hi,

I have data as below

 Quarter Month Target Q1 1 10000 Q1 2 10000 Q1 3 10000 Q2 4 20000 Q3 5 20000 Q4 6 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
Contributor II

Re: QLiksense - Group By

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

New Contributor

Re: QLiksense - Group By

Can you let me know the set analysis for the same

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)

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>

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?

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
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