Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

# in Set Expression (Calc)

{$(#=FWeek-100)}

why Cant i just do (Fweek - 100) in my set expression, it doesnt seem to work an an example in help pointed me towards the syntax #=FWeek-100, But Why, whats the significnce of the # and if its just a variable being declared why cant I use x = val = etc

theres nothing in help about # being a special character ?

ColinR

1 Solution

Accepted Solutions
johnw
Champion III
Champion III

You can't just do (FWeek-100) in your set expression because it will be interpreted as a text literal, and you'll be looking for the value '(FWeek-100)', which won't exist. The $(=...) format is a dollar sign expansion, which tells QlikView to actually interpret what you wrote instead of just treating it as a text literal. The # says to interpret the result as a number, which should already be the case if FWeek is a number, so it shouldn't be necessary here. You are not declaring # to be a variable, so you can't use some other name.

View solution in original post

2 Replies
johnw
Champion III
Champion III

You can't just do (FWeek-100) in your set expression because it will be interpreted as a text literal, and you'll be looking for the value '(FWeek-100)', which won't exist. The $(=...) format is a dollar sign expansion, which tells QlikView to actually interpret what you wrote instead of just treating it as a text literal. The # says to interpret the result as a number, which should already be the case if FWeek is a number, so it shouldn't be necessary here. You are not declaring # to be a variable, so you can't use some other name.

Not applicable
Author

Thanks,

Excellent explanation