Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
Modernize Your QlikView Deployment webinar, Nov. 3rd. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Contributor III
Contributor III

already sum in expression

i have a filed "Amount" in that i already done this in script

load

id, 

sum (amount)

from abc

group by id 

 

now i am trying to add expression like this 

({<id={'1'}>} amount)

but this does not work any help 

here in expression i dont want to add sum because this  sum is already in script 

10 Replies
Highlighted
MVP & Luminary
MVP & Luminary

You should just use sum so you and others understand what kind of measure you created. But if you really don't want to use sum, then use avg or min or max or the only() function. Only({<id={'1'}>} amount).

A chart expression is always aggregated. Even if you don't specify an aggregation function. In that case the only() function is applied implicitly. If you want to use set analysis then you must explicitly use an aggregation function.


talk is cheap, supply exceeds demand
Highlighted
Contributor III
Contributor III

i used only expression but figures is going to display like this ' - ' 

 

i dont want to use sum because i already use in script 

Highlighted
MVP & Luminary
MVP & Luminary

post a small qlikview document that illustrates the problem

talk is cheap, supply exceeds demand
Highlighted
Contributor III
Contributor III

check attached file

Highlighted
Contributor III
Contributor III

any help

Highlighted
Creator II
Creator II

This should work,

 

load

id, 

sum (amount) as amount

from abc

group by id 

Highlighted
Contributor III
Contributor III

i think you did not read my question properly

Highlighted
Contributor III
Contributor III

@Gysbert_Wassenaar any solution
Highlighted
MVP & Luminary
MVP & Luminary

You did not calculate the sums in the script per code_name, but per combination of code_name AND name AND Update_Date. That means there is no single figures value for a single code_name value. And that means you MUST use the sum function in your chart expression if you want to sum all the different figure values that exist for a single code_name value.

Or select a single date. If you do that you will see that your expression with Only() does return a result.


talk is cheap, supply exceeds demand