Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to compare & analyse the data for three months

Hi ,

I need to compare the data for the selected month with previous 2 months.

I am using the sample done by John.

If i select jan 2010 i should see the same data as of the Year, but only for the 3 months(I will post you the exact result in the next post).

But the data i am getting is the avarage of three months.

Please find attached and let me know if this is acheivable in this way or there is any other approach.

Thanks,

Srihari.

7 Replies
Not applicable
Author

This is what is exactly needed on selecting jan 2010.

renjithpl
Specialist
Specialist

kindly look at the attachment, is it something like that.. using trellis..

Not applicable
Author

From the report attached, initially the productive hours for Jan,Feb,Mar is showing 57,58,59 %.

If you select jan 2010 , then you are getting the avarage . The productive hours are showing as 57 % for jan,feb and mar.

I need to get the actual data ,not the avarage.

Please suggest

qliksus
Specialist II
Specialist II

Hi buddy,

i have done some modification in the file and attached .I have created a new table called Main1 and created 2 variables

called a and b and used that in the expression also in the list box i have created a small expression .Please find your attached file

for reference .If this is not what you are looking for then let me know

qliksus
Specialist II
Specialist II

Sorry i forget to add the this expression "

sum



({<Date11={">=$(a)<$(b)"}>}ProductiveHours)/sum({<Date11={">=$(a)<$(b)"}>}TotalHours) "

please add this and check

qliksus
Specialist II
Specialist II

If you want to achieve the result with your logic use the following expression "

aggr



(sum({<MonthYear=>}ProductiveHours)/sum({<MonthYear=>}TotalHours),RollingThreeMonthsAsOfMonthYear) "

Not applicable
Author

Hi,

Thanks a ton for providing these many options Smile

Is there anything wrong with the syntax of the query below :





aggr(sum({<MonthYear=,[ProductiveType]={'non productive'}>}[TotalHours])/sum({<MonthYear=>}TotalHours),RollingThreeMonthsAsOfMonthYear)

Thanks,

Srihari