Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

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

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

Anonymous
Not applicable
Author

Can you let me know the set analysis for the same

Lauri
Specialist
Specialist

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)

Anonymous
Not applicable
Author

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>

Lauri
Specialist
Specialist

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

Thiago_Justen_

May be this:

Aggr(Avg(Target),Quarter)

Thiago Justen Teixeira Gonçalves
Farol BI
WhatsApp: 24 98152-1675
Skype: justen.thiago
sasiparupudi1
Master III
Master III

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