Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

Announcements
IMPORTANT: Upcoming LEF Database Maintenance, Oct. 3rd - SEE DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Specialist
Specialist

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
Highlighted

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
Highlighted

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)

Highlighted
Specialist
Specialist

Whoops. Thanks. Same error though.

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

Highlighted

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

Highlighted

Into some value that includes quotes?

Highlighted
MVP & Luminary
MVP & Luminary

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!

Oleg Troyansky

Masters Summit for Qlik is going virtual! Nov 18th - I'll teach Advanced Set Analysis and AGGR

Highlighted

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?

Highlighted

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

Highlighted
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.

Highlighted
Specialist
Specialist

09/30/2015