Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear all
I am trying to solve a small issue in one of my tables in Qlik Sense. based on the below table I am trying to generate the comparing average of last two month with current month column in Qlik Sense.
The logic is to take average of last two month i.e. (300+400)/2 and check whether its greater than the current month i.e. 500
I tried like this in Qlik :
if (((above(column(1),0)+above(column(1),0))/2) > above(column(1),3), 'True' ,if(((above(column(1),0)+above(column(1),0))/2) < above(column(1),3),'False',' ' )).
but the logic is showing wrong condition. Could someone help on this issue.
Reporting | Act. | Comparing Average of last two month with current month |
01.01.2019 | 300 | |
01.01.2019 | 400 | |
01.01.2019 | 500 | FALSE |
01.01.2019 | 600 | FALSE |
01.01.2019 | 700 | FALSE |
01.02.2019 | 400 | TRUE |
01.02.2019 | 500 | TRUE |
01.02.2019 | 600 | FALSE |
01.02.2019 | 700 | FALSE |
01.02.2019 | 800 | FALSE |
01.03.2019 | 500 | TRUE |
01.03.2019 | 600 | TRUE |
01.03.2019 | 700 | FALSE |
01.03.2019 | 800 | FALSE |
01.03.2019 | 900 | FALSE |
Not sure why but seems to work okay for me (in QlikView... should work the same way in Qlik Sense)
May be something like this
=If(RowNo(TOTAL) > 2, If(RangeAvg(Above(TOTAL Sum(Act), 1, 2)) > Sum(Act), 'TRUE', 'FALSE'))
Dear Sunny,
I want to check with one row value below i.e. ((1st month act. value + 2nd month Act. value )/2)) > (3rd Month Act. value)
Okay, so what is the issue?
Based on your suggested expression its comparing with the 2nd month Act value.
How can I specific a specific value of the column in the expression instead of just sum(act.)
Not sure why but seems to work okay for me (in QlikView... should work the same way in Qlik Sense)
Sorry I did some mistake. Thanks alot.