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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
francisvandergr
Partner - Creator II
Partner - Creator II

Problem with straight table (Conditional sum)

I have a problem with a straight table. When i select group 510, i wanna see in my straight table all searchcodes and in the week the total quantity of searchcodes to deliver in that week.

For example: For searchcode : PKFY-P32 VHM-E i wanna see in week 43 a quantity of 2 and in week 49 a total quantity of 1. (see purchaseorders)

We don't want select a week first. Can someone help me? I have attached an example database

1 Solution

Accepted Solutions
Not applicable

Oh,

and I found two other things concerning your expressions:


sum(If (Week(Ink\Leverdatum) = Week (Today())+1, (Ink\Aantal),0 ))


To work correct, the sum has to be outside. The if is inside the sum. Means, you want to sum the the content of Aantal, when the weeks are matching. Else not.

And I am sure you want to compare with the next week "week() +1", and not with the week of the next day ( week(today+1) )

If you correct that, your app should work. Sorry, that I saw these topics too late.

Roland

View solution in original post

9 Replies
Not applicable

Hi,

take a look at my straight table in your application. I put the delivery-week as a dimension and the rest was easy.

Ragards

francisvandergr
Partner - Creator II
Partner - Creator II
Author

Thank you this works i know. The problem is that my customer want the weeks in columns. Do you know if this is possible ?

Not applicable

Hi,

as far a I know not with straight tables. Then I suppose you do not want to use a Pivot Table. There it is possible, to scratch the dimension into the hrizontal.

OK, ganna look at your Expression.

Not applicable

I build in the week as a calculated expression. Look at my app. again. Then you need to check "Supress Nulls" I think thats the way you want it. And I hided the delivery week.

Regards

Roalnd

Not applicable

BTW:

What about the Year. Didn't you forget the Year in your expression ?

francisvandergr
Partner - Creator II
Partner - Creator II
Author

It is an example. I think i can do this by combine Year and week. Year(Leverdatum) & week(leverdatum)

francisvandergr
Partner - Creator II
Partner - Creator II
Author

But a better solution is always welcome of course !Smile

Not applicable

Oh,

and I found two other things concerning your expressions:


sum(If (Week(Ink\Leverdatum) = Week (Today())+1, (Ink\Aantal),0 ))


To work correct, the sum has to be outside. The if is inside the sum. Means, you want to sum the the content of Aantal, when the weeks are matching. Else not.

And I am sure you want to compare with the next week "week() +1", and not with the week of the next day ( week(today+1) )

If you correct that, your app should work. Sorry, that I saw these topics too late.

Roland

francisvandergr
Partner - Creator II
Partner - Creator II
Author

Thnx for your time. You helped me very much!! It works