Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

ni_avoss
New Contributor III

expression: get value from row where x=y

hi there,

i need to peek some data within one table and don't know how to continue. Explains best on an example:

ProductProductGroupUnitsUnitsGroup
GroupAGroupA3030
AGroupA1030
BGroupA1030
CGroupA1030
GroupDGroupD4040
DGroupD2040
EGroupD2040

ok, so in one column(UnitsGroup) I want to see the Values for a Group and my approach is looking for values where Product=ProductGroup

I start with =if(Product=ProductGroup,sum(Units),)

and now I am stucked with the ELSE

any ideas?

thanks in advance and best regards

4 Replies

Re: expression: get value from row where x=y

How about sum(total <ProductGroup> Units)/2 instead of your if statement?


talk is cheap, supply exceeds demand
ni_avoss
New Contributor III

Re: expression: get value from row where x=y

hi, thanks for you reply.

well, your idea is good.
but my example wasn't that good, as the sum of a group consist also of data, which is not in the table, why "/2" doesnt work. lets assume in my given example UnitsGroup are not 30 and 40 but 50 and 70 or so...

Re: expression: get value from row where x=y

But UnitsGroup will always be the maximum value over the ProductGroup? If so use this: max(total <ProductGroup> Units)


talk is cheap, supply exceeds demand
ni_avoss
New Contributor III

Re: expression: get value from row where x=y

well, this might sound a little bit strange but no, necessarily it's not the maximum (due to other reasons).

well, I finally found a very specific workaround.

But I would be interesited anyway, if there is some solution or possibility like "peek" in an expression

Community Browser