6 Replies Latest reply: Mar 11, 2011 8:02 AM by Hilmi Gunhan

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)

• sum with multiple comditions

Hello,

`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

• sum with multiple comditions

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)

• sum with multiple comditions

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.

• sum with multiple comditions

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?

• sum with multiple comditions

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.

• sum with multiple comditions

Thank you Miguel, you have really saved my life