Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
lsteere01
Contributor
Contributor

Dollar Sign Expansion in Nested IF

The following if statement works, until the else portion of the logic is triggered, then I get the message "Error: Error in set modifier ad hoc element list: ',' or ')' expected"

=if(vFrom = 'N/A', Count({<[Transferred To Facility]={$(vTo)}>}CSN), 'Good')

I've narrowed the problem down to the dollar sign expansion. It seems that Qlikview trips up when dollar expansion is used inside a nested IF.

Does anyone have a solution?

Thanks in advance!

1 Solution

Accepted Solutions
settu_periasamy
Master III
Master III

Hi,

Did you try this/

=if(vFrom = 'N/A', Count({<[Transferred To Facility]={'$(=vTo)'}>}CSN), 'Good')


or

=if($(vFrom) = 'N/A', Count({<[Transferred To Facility]={'$(=vTo)'}>}CSN), 'Good')

View solution in original post

4 Replies
petter
Partner - Champion III
Partner - Champion III

What does the vTo variable contain? Do you have some examples of various values it can contain?

settu_periasamy
Master III
Master III

Hi,

Did you try this/

=if(vFrom = 'N/A', Count({<[Transferred To Facility]={'$(=vTo)'}>}CSN), 'Good')


or

=if($(vFrom) = 'N/A', Count({<[Transferred To Facility]={'$(=vTo)'}>}CSN), 'Good')

Peter_Cammaert
Partner - Champion III
Partner - Champion III

Could it be that vTo expands to something containing spaces? If so, put the $(vTo) part between quotes.

lsteere01
Contributor
Contributor
Author

Your first example worked perfectly. Thanks!