Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

dries_clairhout
New Contributor II

MASTER CALENDER on Calculation

Good day everyone.

 

I have a problem, 

For a client of mine we do calculations to display 5 years of revenue in a single chart.

This is the formula I can use for this:

sum({<Year={">=$(=max(Year)-4)<=$(=max(Year))"}>}GLE15_DB)

 

But now I must make a graphic over 5 years but on the following calculation:

if(sum(GLE15_DB) > sum(GLE15_CR), sum(GLE15_DB) - sum(GLE15_CR))

 

Does anyone now how I integrate the second formula into the first?

Data set analysis isn't my strong suit yet and I don't know how I should structure the formula.

 

Thanks in advance.

Dries

 

 

1 Solution

Accepted Solutions
Partner
Partner

Re: MASTER CALENDER on Calculation

You will need to implement the set in all sub expressions like this:

If(sum({<Year={">=$(=max(Year)-4)<=$(=max(Year))"}>}GLE15_DB) > sum({<Year={">=$(=max(Year)-4)<=$(=max(Year))"}>}GLE15_CR), 
sum({<Year={">=$(=max(Year)-4)<=$(=max(Year))"}>}GLE15_DB) - sum({<Year={">=$(=max(Year)-4)<=$(=max(Year))"}>}GLE15_CR)
)
Please ekskuse my Norglish and Swenglish typos.
1 Reply
Partner
Partner

Re: MASTER CALENDER on Calculation

You will need to implement the set in all sub expressions like this:

If(sum({<Year={">=$(=max(Year)-4)<=$(=max(Year))"}>}GLE15_DB) > sum({<Year={">=$(=max(Year)-4)<=$(=max(Year))"}>}GLE15_CR), 
sum({<Year={">=$(=max(Year)-4)<=$(=max(Year))"}>}GLE15_DB) - sum({<Year={">=$(=max(Year)-4)<=$(=max(Year))"}>}GLE15_CR)
)
Please ekskuse my Norglish and Swenglish typos.