Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Sum if year greather then HELP

Hi,

Can anyone help me with this expression;

If FBÅR > EEAAR then SUMMARGIN

1 Solution

Accepted Solutions
sunny_talwar

Or you can create a flag in the script if the two fields come from the same table

LOAD FBAR,

          EEAAR,

          If(FBAR > EEAAR, 1, 0) as Flag

FROM .....;

and then on the front end, like this

Sum(MARGIN * Flag)

View solution in original post

4 Replies
MK_QSL
MVP
MVP

SUM(IF(FBAR > EEAAR, MARGIN))

sunny_talwar

Or you can create a flag in the script if the two fields come from the same table

LOAD FBAR,

          EEAAR,

          If(FBAR > EEAAR, 1, 0) as Flag

FROM .....;

and then on the front end, like this

Sum(MARGIN * Flag)

Anonymous
Not applicable
Author

Hmm,. the resault was not what i was looking for, let me explain further;

If FBÅR is less then ERAARAR i want it to sum the margin in one collum to the left in the chart.

Like; ERAAR is 2016, FBÅR is 2015, 2014 or 2013.

eksempel.png

sunny_talwar

Not sure I understand still. Would you be able to share a sample with the expected output?