Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
Qlik® Product Spotlight: Discover what’s possible. Get more from our products.
See for yourself. Register today.
bijoylalu
Not applicable

Sum of a field for a specific value in a variable

Sum({<[Category] = {$(Graph1-Group-Value)}>}Budget)

     I want to find the sum of Budget, when Category matches a value specified in a variable, where category is another field in the dataset with Budget.

Here '$(Graph1-Group-Value)' is defined as below

            if($(Graph1-Group1) = 'CML & Synd. Loans - Avg','CML & Synd. Loans - Avg','No Value')

With the above script, the value is not captured

1 Solution

Accepted Solutions
sunny_talwar
Not applicable

Re: Sum of a field for a specific value in a variable

May be try this:

Sum({<[Category] = {'$(=$(Graph1-Group-Value))'}>}Budget)

or


Sum({<[Category] = {'$(=Graph1-Group-Value)'}>}Budget)

2 Replies
sunny_talwar
Not applicable

Re: Sum of a field for a specific value in a variable

May be try this:

Sum({<[Category] = {'$(=$(Graph1-Group-Value))'}>}Budget)

or


Sum({<[Category] = {'$(=Graph1-Group-Value)'}>}Budget)

sunny_talwar
Not applicable

Re: Sum of a field for a specific value in a variable

Or you can check it directly like this:

Sum({<[Category] = {"$(=If($(Graph1-Group1) = 'CML & Synd. Loans - Avg', 'CML & Synd. Loans - Avg', 'No Value'))"}>}Budget)