Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Folks, i have the following data-structure,
Info, Typ, Sales,
ABC1, FK 100
ABC2, FK 150
ABC3, EK 220
ABC4, DK 180
if i want to know the sum of Typ = FK , so then i am using: the set expression like
Sum({<Typ ={'FK'}>}Sales) and my result does look like > Sum of FK = 250 and it does work well,
my issue is, that i have a lot of data, and i want to know the content of fields , like Info
for example: Only(Sum({<Typ ={'FK'}>}Sales)) and i want to display the fields with Info: ABC1, ABC2 but it does not work.
Does anybody have any idea, how to show the content of fields of Info on the base of fields of Typ, Sales
Thanks a lot
Beck
try this
aggr(Only(Sum({<Typ ={'FK'}>}Sales)),info)
Hi Chanty,
thanks a lot for your responce, but this expresssion does not work,
i want to use such expression in listbox (Qlik Sense) like a filter.
Do you have any idea?
Thanks a lot
Beck
Hi,
only will return the distinct value, so try like this
only(aggr(Sum({$<Typ ={'FK'}>}Sales),Info))
for your listbox expression like this
=if(Typ='FK',Info) or
=if(aggr(Sum({$<Typ ={'FK'}>}Sales),Info),Info)
if you use that exp in listbox what your getting?
i want to see the content like: ABC1. ABC2
The Aggr() is redundant here (and possibly quite expensive to calculate).
Sum({<Typ ={'FK'}>} Sales) as an expression with Info as a dimension will produce the same result as the Aggr().
Please do not clutter the expressions with unnecessary operations. Test the simple operations first.
hi,
pfa for qliksense sample
another way u can simple create table in sense
Dimension:
Info,
Type
Measure
Sum({$<Typ ={'FK'}>}Sales) // best approach and avid using aggr inside measure
Hi Devarasu,
can i use this expression in listbox like a filter, i mean, if i open the the app, then i want to see on the left-handside the litbox like a filer with contents with only: ABC1, ABC2 and if i select ABC1. then i see in the table the sum: 100
Thanks a lot
Beck
=if(Typ='FK',Info)