Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

sum with multiple comditions

Hello everyone,

I am in a trouble in my Qlikview project. I am desinging a chart that has two comparison columns, sum of minimum date (APKO_RAPOR_TARIHI) and sum of maximum date. Moreover I have one more criteria for these calculation (APKO_MT_TIP =0).

I wrote down this formula but it did not return anything. Can anyoen help ?

=Sum ( {$< APKO_RAPOR_TARIHI=(=max(APKO_RAPOR_TARIHI),APKO_MT_TIP={APKO_MT_TIP=0}>} total APKO_MT_TL_BAKIYE)





1 Solution

Accepted Solutions
Miguel_Angel_Baeyens

Hello,

Almost there

=Sum({$<APKO_MT_RAPOR_TARIHI = {"$(=DATE(Max(APKO_RAPOR_TARIHI),'DD.MM.YYYY'))"} >} total APKO_MT_TL_BAKIYE)


Dates represented as such are cconsidered as strings, so you need to quote them.

Hope that helps.

View solution in original post

6 Replies
Miguel_Angel_Baeyens

Hello,

Your expression should look like

Sum({$< APKO_RAPOR_TARIHI = {'$(=max(APKO_RAPOR_TARIHI))', '$(=Min(APKO_RAPOR_TARIHI))'}, APKO_MT_TIP = {0} >} total APKO_MT_TL_BAKIYE)


Should the result of Max(APKO_RAPOR_TARIHI) is numeric, you better remove the quotes above

Hope that helps

Not applicable
Author

thanks Miguel.

APKO_RAPOR_TARIHI is in date format so I converted the condition into date. But I still can not reach the solution.

=Sum({$<APKO_MT_RAPOR_TARIHI = {$(=DATE($(=max(APKO_RAPOR_TARIHI)),'DD.MM.YYYY'))} >} total APKO_MT_TL_BAKIYE)



Miguel_Angel_Baeyens

Hello,

Almost there

=Sum({$<APKO_MT_RAPOR_TARIHI = {"$(=DATE(Max(APKO_RAPOR_TARIHI),'DD.MM.YYYY'))"} >} total APKO_MT_TL_BAKIYE)


Dates represented as such are cconsidered as strings, so you need to quote them.

Hope that helps.

Not applicable
Author

Thanks Miguel. IT helped much, At least I can have some figures.

But same number for all table rows. Seemingly it sums all values in my data table regardless my pivot dimensions.

Any suggessions?

Miguel_Angel_Baeyens

Yes, that's because of the "TOTAL" keyword in your function. Remove it, and it will aggregate for each value in the dimension.

Hope that helps.

Not applicable
Author

Thank you Miguel, you have really saved my life Big Smile