Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set analysis with MakeDate

Another set analysis problem. [:P]

To validate I've added

if(MakeDate(Year, num(Month),Day)<= Date(Today()),1,0)

in the table and it evaluates as expected.

Unfortunately this set analysis expression doesn't:

=Sum({$<MakeDate(Year,num(Month),Day)={'<=$(=Date(Today()))'}>} Budget_ValueSEDay)

I suppose there is some syntax problems, right?
1 Solution

Accepted Solutions
Not applicable
Author

You can do something like this:


left join (YourTable)
Load *,
if(MakeDate(Year, num(Month),Day)<= Date(Today()),1,0) as YourFlag
resident YourTable;


After this you can use "YourFlag" field in your expression:


=Sum({$<YourFlag={"<=$(=Date(Today()))"}>} Budget_ValueSEDay)


View solution in original post

3 Replies
Not applicable
Author

You Set expression is not correct. Instead of "MakeDate(Year,num(Month),Day)" you should use a Field name which you want use for a selection.

Check the syntax:

set_modifier ::= < field_selection {, field_selection } >

field_selection ::= field_name [ = | += | ¬-= | *= | /= ] element_set_expression

element_set_expression ::= element_set { set_operator element_set }

element_set ::= [ field_name ] | { element_list } | element_function

element_list ::= element { , element }

element_function ::= ( P | E ) ( [ set_expression ] [ field_name ] )

element ::= field_value | " search_mask "



Not applicable
Author

You can do something like this:


left join (YourTable)
Load *,
if(MakeDate(Year, num(Month),Day)<= Date(Today()),1,0) as YourFlag
resident YourTable;


After this you can use "YourFlag" field in your expression:


=Sum({$<YourFlag={"<=$(=Date(Today()))"}>} Budget_ValueSEDay)


Not applicable
Author

Thank you for your responses.

The syntax was of course not correct - but it would have been great if my expression woule have evaluated.

Now I create the Date in a load script.