Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

6 months rolling set analysis expression not working with aggr function

Hi,

avg(aggr(((Sum(a/b))*c),[emp ID],Month_Year))

This was my expression initially in the chart, then i got a requirement of 6 months rolling for that chart, i used the below set analysis expression, which is working fine in all expressions except the above one, where i have used aggr

Its not working with the aggr function.

{<Month_Year = {">=$(=Date(addmonths(Max(Month_Year), -5), 'MMM-YYYY')) <=$(=Date(addmonths(Max(Month_Year), 0),  'MMM-YYYY'))"} >}.

Please help me to find out how can i do 6 months rolling for this expression

Dimension - Month_Year

avg(aggr(((Sum(a/b))*c),[emp ID],Month_Year))



thanks..


34 Replies
sunny_talwar

What is the output you are looking to see?

Anonymous
Not applicable
Author

I implemented the same in my application as you done in sample. But i couldn't able to see anything in the graph.

Its not working.

It works only ( the graph is displayed ) only if i select a set of employee id's or single emp id, else no data to display.

can you tell what could be the issue ?

sunny_talwar

Do you may be have dates in the future which are not associated with any employeeID?

sunny_talwar

To check this, create a text box object like this

='>=' & Date(addmonths(Max(Month_Year), -5), 'MMM-YYYY') & '<=' & Date(addmonths(Max(Month_Year), 0),  'MMM-YYYY')

and see what you get when no selections are made... are you getting future months?

Anonymous
Not applicable
Author

No. I dont get future dates. I have data till july. So it is displaying from feb to july..

Pls find the screenshot

date.PNG

sunny_talwar

Can you also post a screenshot of your Month_Year field in list box with no formatting... just how it comes from the db

Anonymous
Not applicable
Author

Actually its not from db, as of now it is like below,

I am reading files in a loop, where it assigns the month_year for all the files am reading as follows

month_year.PNG

sunny_talwar

All this looks good to me... I am not sure why you don't see anything....

Anonymous
Not applicable
Author

not sure. .

Ill try sending only that part of the application. So that you can help me

Anonymous
Not applicable
Author

Can you please share me your mail id, so that i can send you .

I have been stuck on this for 2 days.

Thank you