Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Addmonths in Set Analysis ( next 3 months)

Hello,

Guys need your help!

I want to create an expression with average of next three months. I tried to use this one with addmonths function, but it's not working

Avg({<Month_name={">=$(=Date(addmonths(Month_name,1),'MMM'))<=$(=Date(addmonths(Month_name,3),'MMM'))"}>} Values)

Please help!

13 Replies
PrashantSangle

Hi,

Try below expression

=Avg({<Month_Date={">=$(=Date(addmonths(Month_Date,1),'MMM-YY'))<=$(=Date(addmonths(Month_Date,3),'MMM-YY'))"},Month_name=>} Bench_Data)

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
Not applicable
Author

This expression isn't working

PrashantSangle

Hi,

I have tested data let me know what was your expecting output.

It is working at my end.

testCase:

Selected Month : Mar

Employee Name : Itojqj Tygnss

Expected Avg for next 3 month is sum(Apr,May,Jun)/3

Result :

Then Bench_data for Apr,May jun is 1.94

and Avg is 0.64666

Please find attached apps.

Regards,

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
Not applicable
Author

Wow, it works now.

Thanks a lot for your hep!!!