Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
cbaqir
Specialist II
Specialist II

Variable in Set Analysis

Why would this expression give me Error in set modifier ah doc element list?

=SUM({<FCST_DATE={'$(vPriorQuarter)'},FCST_AMT)

1 Solution

Accepted Solutions
sunny_talwar

I think you should probably add another dollar sign expansion -> $(=$(vPriorQuarter)), and secondly make sure that the date format for FCST_AMT is MM-DD-YYYY.

Try this may be:

=Sum({$<FCST_DATE={'$(=$(vPriorQuarter))'}>}FCST_AMT)

View solution in original post

13 Replies
Peter_Cammaert
Partner - Champion III
Partner - Champion III

Maybe because part of the set analysis is missing? Like a terminating >}. And the comma doesn't belong there.

Try with:

=SUM({<FCST_DATE={'$(vPriorQuarter)'}>} FCST_AMT)

cbaqir
Specialist II
Specialist II
Author

Whoops. Thanks. Same error though.

=Sum({$<FCST_DATE={'$(vPriorQuarter)'}>}FCST_AMT)

sunny_talwar

What does your vPriorQuarter expand to in a text box object?

Peter_Cammaert
Partner - Champion III
Partner - Champion III

Into some value that includes quotes?

Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi Cassandra,

this is hard to guess, without seeing your application. A few thoughts:

- Expression Editor doesn't recognize variables in Set Analysis expressions, so it always shows "Error in Expression", even for valid expressions.

- What's in the variable vPriorQuarter - is that a date? or a Quarter?

- If you use this expression in a Straight Table with an empty label, what formula do you see in the heading? You should be able to see how the variable gets expanded, and that might show you what could be wrong.

Cheers.

Come back to study our new and improved curriculum at the Masters Summit for Qlik - coming soon to Milan, Italy, and Austin, TX!

Peter_Cammaert
Partner - Champion III
Partner - Champion III

BTW in case of an error, the expression editor will use red "wiggly" lines to mark the expression part that is in error. what part would that be?

Peter_Cammaert
Partner - Champion III
Partner - Champion III

Oleg,

- Expression Editor doesn't recognize variables in Set Analysis expressions, so it always shows "Error in Expression", even for valid expressions.


Does that include $-sign substitution between quotes?


Peter

swuehl
MVP
MVP

Just guessing:

your variable is defined without a leading equal sign, hence expand to the expression itself, not the evaluated value.

If so, try adding a leading equal sign to your variable definition, or add an equal sign to the dollar sign expansion:

=SUM({<FCST_DATE={'$(=vPriorQuarter)'}>} FCST_AMT)


[I would prefer changing the variable definition]


If that's not the case / cause, please post your definition of the variable.

cbaqir
Specialist II
Specialist II
Author

09/30/2015