Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
bruno_ml
Partner - Contributor III
Partner - Contributor III

SET Analysis with Last Year

Hello,

I have a expression with SET Analysis which I am not succeed to create.

My need is to have the Amount of sales of Real Customer (FICTIF_FLAG=0) who have buy last year minimum 2 type of products.

My Expression is here :

SUM(

{<

$(v_SET_Flag_FICTIF),$(v_SET_Y-1)

,[KEY_CUSTOMER]={'=count({<[FICTIF_FLAG]={0},[DATE]={'<=$(=Date(Addmonths(Max(DATE),-12),'DD/MM/YYYY')) >=$(=Date(Addmonths(Min(DATE),-12),'DD/MM/YYYY'))'},[DATE.autoCalendar.Date],[DATE.autoCalendar.Month],[DATE.autoCalendar.Quarter],[DATE.autoCalendar.Week],[DATE.autoCalendar.YearMonth],[DATE.autoCalendar.Year],[PRODUCT.AXIS]={'Make-up','Fragrances','Skincare'}>} distinct [PRODUCT.AXIS])>1'}

>} VALID_SALES/YTD_CHANGE_RATE)

Do you have an idea where is my fault ?

Kind regard,

Bruno

13 Replies
sunny_talwar

Can you check what you get when you use this in a KPI object?

='<=' & Date(Addmonths(Max(DATE),-12), '$(v_SET_Format_Date)') & '>=' &  Date(Addmonths(Min(DATE),-12), '$(v_SET_Format_Date)')

sunny_talwar

In that case, try this

[DATE] = {">=$(=Date(YearStart(Min(DATE), -1), '$(v_SET_Format_Date)'))<$(=Date(YearStart(Max(DATE)), '$(v_SET_Format_Date)'))"}, [DATE.autoCalendar.Date], [DATE.autoCalendar.Month], [DATE.autoCalendar.Quarter],

[DATE.autoCalendar.Week], [DATE.autoCalendar.YearMonth], [DATE.autoCalendar.Year]

bruno_ml
Partner - Contributor III
Partner - Contributor III
Author

I Have <=16/03/2017>=11/02/2013

bruno_ml
Partner - Contributor III
Partner - Contributor III
Author

Thanks for this, it's work for all year, I need to see if my users want since the begin of the year or for the same period exactly.