Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

partial sum problem

Hello

sorry if Im asking something easy but Im very new to QW

I have this expresion an i cant get partial sum . What am I doing wrong ?

IF(findoc_series='1101'OR(findoc_series= '1106'),1 )

Thanks in advance

1 Solution

Accepted Solutions
jagan
Luminary Alumni
Luminary Alumni

Hi,


Try like this

=Count({< findoc_series = {'1101', '1106'>} distinct [Series No])


Regards,

Jagan.

View solution in original post

15 Replies
iktrayanov
Creator III
Creator III

It isn't clear what are you trying to do. Is this an expression or is this in your script? What are you trying to sum?

swuehl
MVP
MVP

Ionnis,

please read

http://community.qlik.com/blogs/qlikviewdesignblog/2013/08/06/it-s-all-aggregations

You should use an aggregation function in your expression.

In the context of your partial sums, findoc_series is probably not unambiguous, so the expression can't evaluated to a value.

Are you looking for something like this?

=sum(if( findoc_series = 1101 or findoc_series = 1106, 1))

Not applicable
Author

When i use this =sum(if( findoc_series = 1101 or findoc_series = 1106, 1))  i get

1.jpg

but this is not right for the column CUSTOMERS

when i use         if( findoc_series = 1101 or findoc_series = 1106, 1)  i get

2.jpg

this is correct for the number of customers by row but i dont have a Sum at the top

swuehl
MVP
MVP

It seems like you want a sum of rows in a pivot table, so maybe like

=sum( aggr( if( findoc_series = 1101 or findoc_series = 1106, 1), Dim1, Dim2, Dim3, Dim4))


Replace Dim1 ... Dim4 with your chart dimension fields.

iktrayanov
Creator III
Creator III

Change you total mode from expression default to sum

iktrayanov
Creator III
Creator III

Not applicable
Author

This returns 0 to all fields

Not applicable
Author

how can i do this ? the Total Mode is Expression Total by default and i have no choice

iktrayanov
Creator III
Creator III

Try this =count(if( findoc_series = 1101 or findoc_series = 1106, 1))