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

Set analysis with date between

Hello, guys!

I have a problem with set analysis, I need to create an expression with the average of values for the period from January till Month picked by user in the filter.

I created and expression: AVG({<Month_Date={">=$(=Min({1}Month_Date))<=$(=Max(Month_Date)"},Month_name=>}(Bench_Data*Forecast)), but it's not working,

May be I have some syntax error?

Please help!

Sample app is attached

4 Replies
marcus_sommer

You have a 1 within the set analysis which meant to ignore user selections. You need to remove it:

AVG({<Month_Date={">=$(=Min({1}Month_Date))<=$(=Max(Month_Date)"},Month_name=>}(Bench_Data*Forecast))

- Marcus

swuehl
MVP
MVP

There is just a closing bracket missing:

AVG({<Month_Date={">=$(=Min({1}Month_Date))<=$(=Max(Month_Date))"},Month_name=>}(Bench_Data*Forecast))

Not sure if the logic is correct since min Month_Date is Jan-14.

Not applicable
Author

Yes, You're absolutely correct. It's not right, I need to set as min date Jan-15.

How can I insert this condition in my Set analysis?

swuehl
MVP
MVP

Not sure, maybe like

AVG({<Month_Date={">=$(=Date(yearstart(today()),'MMM-YY'))<=$(=Max(Month_Date))"},Month_name=>}(Bench_Data*Forecast))