Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Zurich on Sept 24th for Qlik's AI Reality Tour! Register Now
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
Partner - Champion III
Partner - Champion III

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
Partner - Champion III
Partner - Champion III

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
Partner - Champion III
Partner - Champion III

Hi,

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

Regards,

Jagan.