
Contributor
2020-06-01
06:43 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Add a parameter to a variable
Hi!
I would like to create a variable in the front end of qlik sense with a parameter, as I did in qlik view:
(sum(cost) / $1)
but it doesn't work and the message is "Error in expression". Do you know why?
Thanks a lot!
- Tags:
- variable
7,406 Views
1 Solution
Accepted Solutions


Partner - Champion
2020-06-01
09:26 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
let's try as below:
variableName = sum(cost) / $1
call it as:
$(variableName(parameter value))
ex. $(variableName(2))
7,374 Views
3 Replies


Partner - Champion
2020-06-01
09:08 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
your expression doesn't works also in qlikview.
I just tried it on version April 2020.
7,378 Views


Partner - Champion
2020-06-01
09:26 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
let's try as below:
variableName = sum(cost) / $1
call it as:
$(variableName(parameter value))
ex. $(variableName(2))
7,375 Views

Contributor
2020-06-01
10:32 AM
Author
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have the same messagge of error with my and your solution.. but using both in a text object the result is correct...
thanks
7,368 Views
