Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
krmvacar
Creator II
Creator II

Dimension calculate aggr only

Hello,

as you can see in the qvf file below,

I want to make a calculation in the dimension area here, but I am getting an error.

krmvacar_0-1643295266441.png

ı want to show here b>50.000 and Sum(c) /Sum(b)>0.25 but ıs not workıng. The codes area my codes:

=aggr(only({<code={"=Sum(b)>50.000"},[code]={"= (Sum(c) /Sum(b))>0.25"}>}[code]),[code])

your help is welcome

 

my qvf attachment

Labels (4)
1 Solution

Accepted Solutions
rubenmarin

Hi, 2 changes:

- "=Sum(b)>50.000" it's the same than "=Sum(b)>50" because the dot it's readed as decimal separator, so use "=Sum(b)>50000"

- If you set the same field two times only the last one is used, you can combine different sets using operator, + is used to add (only one of the conditions need to be true), * to use intersections (all the conditions neds to be true).

So at the end you can use:

=aggr(only({<code={"=Sum(b)>50000"}>*<[code]={"= (Sum(c) /Sum(b))>0.25"}>}[code]),[code])

View solution in original post

2 Replies
rubenmarin

Hi, 2 changes:

- "=Sum(b)>50.000" it's the same than "=Sum(b)>50" because the dot it's readed as decimal separator, so use "=Sum(b)>50000"

- If you set the same field two times only the last one is used, you can combine different sets using operator, + is used to add (only one of the conditions need to be true), * to use intersections (all the conditions neds to be true).

So at the end you can use:

=aggr(only({<code={"=Sum(b)>50000"}>*<[code]={"= (Sum(c) /Sum(b))>0.25"}>}[code]),[code])

krmvacar
Creator II
Creator II
Author

Thank you so much its working