Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Sum if

Hi,

I have created the following expression.

=Num(if(Sum ([Receipt_STK Value]) = Sum ([Sale_STK Value]),0,1))

It does display 0 or 1.  But i am unable to show the total i.e. sum of values on Dimensions.  I have enabled show partial sums and Sum of Rows

Venu

1 Solution

Accepted Solutions
jagan
Luminary Alumni
Luminary Alumni

Hi,

Try like this

= Sum(Aggr(if(Sum ([Receipt_STK Value]) = Sum ([Sale_STK Value]),0,1), ChartDim1, ChartDim2, .. ChartDimN))


Regards,

Jagan

View solution in original post

4 Replies
jagan
Luminary Alumni
Luminary Alumni

Hi,

Try like this

= Sum(Aggr(if(Sum ([Receipt_STK Value]) = Sum ([Sale_STK Value]),0,1), ChartDim1, ChartDim2, .. ChartDimN))


Regards,

Jagan

Not applicable
Author

hi try this

sum(

if(

if(Sum ([Receipt_STK Value]) = Sum ([Sale_STK Value]),0,1),

[Receipt_STK Value]

)

)

Not applicable
Author

Thanks Jagan,

It worked.

I have the following expression in which i do not want to display value which are NULL.  But i  want to include Zero

=if(((Sum ([CLosing_STK Value]) + Sum ([Intran_STK Value])) / (Sum ([Avg Value])/30)) <=10,(Sum ([CLosing_STK Value]) + Sum ([Intran_STK Value])) / (Sum ([Avg Value])/30))

Regards

Venu

jagan
Luminary Alumni
Luminary Alumni

Hi,

Can you attach some sample application and come up with an example, it helps in understanding the scenario easily.

Regards,

Jagan.