Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
wgonzalez
Partner - Creator
Partner - Creator

Changing from monthly/quarterly trends on same chart.

Hi,

I have a chart that shows monthly absenteeism trend.  Now I want the user to be able switch from monthly to quarterly.  I tried by creating a drill-down group dimension, but the quarterly figure is wrong.  In order to calculate quarterly absenteeism % I have to sum two data items per month (aggregate them) first.  I'm having issues on geting this.

Any suggestions?

Thanks.

7 Replies
Anonymous
Not applicable

Hi Wilfredo,

Hard to give an exact answer without seeing the document. It does sound like the Aggr() function could help you though allowing you to aggregate over the Month values, even when switching to the quarterly dimension view.

sujeetsingh
Master III
Master III

just post a sample...it will be much helpful./

Not applicable

Hi,

U need to create the Quarter field and Monthly field form ur Date field

Month= Month(DateField) as Month

Quarter= 'Q' & Num(Ceil(Num(Month(Datefield))/3)) as Quarter

Then, Add this field in Drildown Group or Cyclic Group.

I hope this Helps U....

Regards

Kabilan K.

wgonzalez
Partner - Creator
Partner - Creator
Author

I have this Pivot whose dimension is Month.

% = HL / AH

Month

HCAvail DaysHNAHHL %
Jul6722228,732.889,539.37,198.58.0%
Aug668235,477.3117,434.89,818.88.4%
Sep668209,138.897,741.37,139.07.3%

To get Quarterly % I need to sum AH of the three months, the same for HL then calculate %.  When I make the pivot with dimension Quarter the wrong % is provided (see below).  The correct quarterly % is 7.9%.

QuarterHCAvail DaysHNAHHL%
Q32,0086543,348.81,000,811.324,156.32.4%

I now I need to calculate AH on each individual month, sum them.  Do the same for HL, then calc %.  The question is how can I aggregate by Month, sum the result to then calculate %.

Thanks.

Not applicable

Hi,

Please find this attachment,

I hope this helps u.

Regards,

Kabilan K.

sujeetsingh
Master III
Master III

A good answer by Kabilan ..

Just get Month field as dimention and  then in expression Sum(Al)...and all you want.

wgonzalez
Partner - Creator
Partner - Creator
Author

Thanks, I'm taking the idea to implement a solution.