# QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

cancel
Showing results for
Did you mean:
Not applicable

## Sum(total <dim1 >[Expression1]) in Pivot table is not working?

Dear Community,

I would like to use expression in another expression in pivot table with Sum(total <dim1 >[Expression]) condition,

but it is not working, anyone has idea?

Attached herewith the sample (where it is not a real case which is much more complicated)

The reason why I need to apply:

Expression1 is actually an input field, which is one of the column in table.

Client can change the value for that input column, and any change in this column will reflect to Expression2.

where Expression2 = Sum(total <dim1 >[Expression1])

There are 3 conditions to calculate Expression2 based on expression1 value,

Example:

if(expression1<100 ,  expression1*0.01,

if(expression1=100, expression1*0.02,

if(expression1>100, expression1*0.03, 0)))

Hope someone could help!

Thanks,

Chanel

6 Replies
MVP

What logic you want to apply here?

Update :

Try as Below

SUM(IF(Aggr(SUM(TOTAL <Month> Sales),Salesman)>=15000,Sales))

Partner

Hi,

Try like this

if( [Total Sales] >= 15000, sum(Total <Month> Sales))

Regards,

Jagan.

Specialist II

try this expression for the second one.

If (ColumnNo(1) >= 15000,  OptionTrue, OptionFalse)

Changing Options for you apropiate formula

Joaquín

Not applicable
Author

Dear all,

The sample is just the example, my expression is far more complicated than this, my problem is

how can i call another expression in the same table,

if i have that condition

= sum(total <abc>

if([expression1] = 'blabla', 'Sales'))

Is it not possible to use expression in sum(total ...) ?

Thanks,

Chanel

MVP

What is your LOGIC? can you please elaborate little more that what you want to achieve?

Thanks

Not applicable
Author

Well, the expression1 is actually an input field, which is one of the column in table.

Client can change the value for that input column, and any change in this column will reflect to expression2.

So expression2 has to call expression1, then based on expression1 value,

there are 3 conditions:

Example:

if(expression1<100 ,  expression1*0.01,

if(expression1=100, expression1*0.02,

if(expression1>100, expression1*0.03, 0)))

At last, we would need to get the total of this 3 conditions, that's why i need to use sum(total <> if(blabla....))

Thanks,

Chanel