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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
dries_clairhout
Creator
Creator

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
Vegar
MVP
MVP

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)
)

View solution in original post

1 Reply
Vegar
MVP
MVP

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)
)