8 Replies Latest reply: Feb 12, 2018 12:06 PM by Xavier Garcia

# SET Analysis How to set date greater then 2016 ?

Hi

Below expression work fine for year= 2016 :-

Sum({<year={2016},REGION_={Singapore}, COMPANY = {"=Rank(Sum({<year = {2016}>} sales)) <= 8"}>} sales)

I need to change the above expression for year 2016 2017 2018 . which is > 2016.

I try below , but cannot work :-

Sum({<year={">2016"},REGION_={Singapore}, COMPANY = {"=Rank(Sum({<year = {">2016"}>} sales)) <= 8"}>} sales)

Sum({<year>={2016},REGION_={Singapore}, COMPANY = {"=Rank(Sum({<year >= {2016}>} sales)) <= 8"}>} sales)

Hope some one can share with me.

Paul Yeo

• ###### Re: SET Analysis How to set date greater then 2016 ?

Ideally your first expression :

Sum({<year={">2016"},REGION_={Singapore}, COMPANY = {"=Rank(Sum({<year = {">2016"}>} sales)) <= 8"}>} sales)

should work. However, if you have some other fields that has selections too can cause this not work. Then you could try by passing those fields selections like:

Sum({<year={">2016"},Quarter,Month,Date,REGION_={Singapore}, COMPANY = {"=Rank(Sum({<year = {">2016"},Quarter,Month,Date>} sales)) <= 8"}>} sales)

Update: corrected a comma

• ###### Re: SET Analysis How to set date greater then 2016 ?

Hi Tres

Thank you for your help. I have try but still not working.

Paul Yeo

• ###### Re: SET Analysis How to set date greater then 2016 ?

Try correcting two quotes and a comma like:

Sum({<year={">2016"},Quarter,Month,Date,REGION_={Singapore}, COMPANY = {"=Rank(Sum({<year = {[>2016]},Quarter,Month,Date>} sales)) <= 8"}>} sales)

I could not validate since your sample app doesn't have data beyond 2016.

• ###### Re: SET Analysis How to set date greater then 2016 ?

Thank you very much , it work now.

• ###### Re: SET Analysis How to set date greater then 2016 ?

I can see that in enclosed file you have only 2016 data for year field.

• ###### Re: SET Analysis How to set date greater then 2016 ?

Hi paulyeo11,

your first attemp should work:

Sum({<year={">2016"},REGION_={Singapore}, COMPANY = {"=Rank(Sum({<year = {">2016"}>} sales)) <= 8"}>} sales)

Make sure you have [Year] values greater than 2016.

Regards,

• ###### Re: SET Analysis How to set date greater then 2016 ?

Hi Xavier

May I know how you know due to year or Year issue ? How you find out ?

Paul Yeo

DIrector

TDS Technology (S) P/L

Whatsapp +65 9326 1804

www.tdstech.com<http://www.tdstech.com>

• ###### Re: SET Analysis How to set date greater then 2016 ?

Hi paulyeo11,

I downloaded your Ask.qvf file. In there, you only have 1 value for year (=2016). Therefore, ever since you write the expression

Sum({<year={">2016"},REGION_={Singapore}, COMPANY = {"=Rank(Sum({<year = {">2016"}>} sales)) <= 8"}>} sales),

there is no year> 2016, neither Companies ranked the 8th.

If you can load more data for future years, then the expression would work.

Hope this helps.

Regards,