Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to create constant value in Qlikview

I want to define a constant value in Qlik that contains the total of a field.  This value which will be contained in a text object will not change when user clicks various drop-down items.. I want to be able to use this constant value in further calculations.

Thanks,

1 Solution

Accepted Solutions
Frank_Hartmann
Master II
Master II

Its called Set Identifiers:

Examples:

sum( {$} Sales )
returns sales for the current selection, i.e. the same as sum(Sales).

sum( {$1} Sales )
returns sales for the previous selection.

sum( {$_2} Sales )
returns sales for the 2nd next selection, i.e. two steps forward. Only relevant if you just made two Back operations.

sum( {1} Sales )
returns total sales within the application, disregarding the selection but not the dimension. If used in a chart with e.g. Products as dimension, each product will get a different value.

sum( {1} Total Sales )
returns total sales within the application, disregarding both selection and dimension. I.e. the same as sum(All Sales).

sum( {BM01} Sales )
returns sales for the bookmark BM01.

sum( {MyBookMark} Sales )
returns sales for the bookmark MyBookMark.

sum({Server\BM01} Sales)
returns the sales for the server bookmark BM01.

sum({Document\MyBookmark}Sales)
returns the sales for the document bookmark MyBookmark. 

View solution in original post

4 Replies
Frank_Hartmann
Master II
Master II

see attached file

hope this helps

Not applicable
Author

ok. Is this called set analysis ?

Frank_Hartmann
Master II
Master II

Its called Set Identifiers:

Examples:

sum( {$} Sales )
returns sales for the current selection, i.e. the same as sum(Sales).

sum( {$1} Sales )
returns sales for the previous selection.

sum( {$_2} Sales )
returns sales for the 2nd next selection, i.e. two steps forward. Only relevant if you just made two Back operations.

sum( {1} Sales )
returns total sales within the application, disregarding the selection but not the dimension. If used in a chart with e.g. Products as dimension, each product will get a different value.

sum( {1} Total Sales )
returns total sales within the application, disregarding both selection and dimension. I.e. the same as sum(All Sales).

sum( {BM01} Sales )
returns sales for the bookmark BM01.

sum( {MyBookMark} Sales )
returns sales for the bookmark MyBookMark.

sum({Server\BM01} Sales)
returns the sales for the server bookmark BM01.

sum({Document\MyBookmark}Sales)
returns the sales for the document bookmark MyBookmark. 

vishsaggi
Champion III
Champion III

May be create a variable? Like

Click Ctrl+Alt+V then Add

Give a name like vTotalValue

= Sum({1} YourfieldHere)

Then use a textobject and type

= vTotalValue