Skip to main content
Announcements
Qlik Community Office Hours - Bring your Ideation questions- May 15th, 11 AM ET: REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Set Analysis Syntax

Hello All,

Can anybody suggest what is wrong in this following syntax?

=sum({$<[Posting Date] = {"<=$(=VPostYear,=VPostMonth)"}, Clearing_Date= {">=$(=VPostYear,=VPostMonth)"}>} [Amount in LC])

Please suggest.

Regards,

Balraj

4 Replies
Gysbert_Wassenaar

This part doesn't make sense to me: $(=VPostYear,=VPostMonth). If Posting Date is a date then you should have a date on the right hand of the <=. Perhaps $(=makedate(VPostYear,VPostMonth)).


talk is cheap, supply exceeds demand
Anonymous
Not applicable
Author

Gysbert,

I am not making any date here, I have a field Posting Date and I am comparing Posting Date with the selected year and month.

For me it seems, there is syntax error in Set analysis the way I am comparing.

Example: Say if user is selecting a Year and a Month, now I want to load that data only whose posting date was less than or equal to selected year and month, and whose Clearing Date is greater than or equal to selected year and month.

Could you help to make it correct?

Gysbert_Wassenaar

Example: Say if user is selecting a Year and a Month, now I want to load that data only whose posting date was less than or equal to selected year and month, and whose Clearing Date is greater than or equal to selected year and month.

Use the makedate function to create a date from the selected year and month so that date value can be compared with the date values in your Posting Date field. MakeDate(2014,9) will create the first of september 2014 as date value. A date value like that can be used to compare other dates with to check if they come before or after it.


talk is cheap, supply exceeds demand
Anonymous
Not applicable
Author

okay,

Let me try this.