Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Not applicable

Combine two sum formulas

Hello,

How to combine into one formula:

Sum({$<Year={$(=Max(Year)-1)}, ST={'N'}>} BALANCE)+Sum({$<Year={$(=Max(Year)-1)}, ST={'N'}>} SUBCHARGE)

Additional:

If I want to? Use sum total ?

Sum({$<Year={$(=Max(Year))}, STATUS={'Y'}>} BALANCE)+Sum({$<Year={$(=Max(Year))}, STATUS={'Y'}>} SUBCHARGE) then divide

Sum({$<Year={$(=Max(Year)-1)}, STATUS={'N'}>} TOTAL)

Thank you.

3 Replies
brenner_martina
Valued Contributor II

Combine two sum formulas

Hi,Sheann

what is your problem? It's possible like this:

Sum({$<Year={$(=Max(Year)-1)}, ST={'N'}>} BALANCE + SUBCHARGE)

Sum({$<Year={$(=Max(Year)-1)}, ST={'N'}>} BALANCE + SUBCHARGE) /

Sum({$<Year={$(=Max(Year)-1)}, STATUS={'N'}>} TOTAL BALANCE +SUBCHARGE)

Greetings from Munich

Martina

EVACO GmbH

Not applicable

Combine two sum formulas

Hi Martina,

Thnak for your help.

Sum({$<Year={$(=Max(Year)-1)}, ST={'N'}>} BALANCE + SUBCHARGE) don't work. MY bar disappear after change to this formula.

brenner_martina
Valued Contributor II

Re: Combine two sum formulas

Hi, Sheann,

did you select a year? Set Analysis maybe exprect to select a year. I tried this expression in my application and it works fine.

Greetings from Germany

Martina

EVACO GmbH

Community Browser