Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello Team,
I am new to Qliksense,need your help
I need to create a growth flag 'Y' or 'N' based on condition were if previous month outstanding balance is less than current month balance than flag would be 'Y' ie previous (Jan 19 is 1000 )and Current month ( ie Feb 19 is 2000 )then Growth would be Y and if previous month outstanding balance is greater than Current balance then growth would be N ie Previous Jan 19 is 4000 and Current Feb 19 is 3000.Comparing should be based on previous and Current Month and Zone.
Finally once flag is Set need to show only data whose flag is N and hide all the data whose flag is Y.
Please refer attached excel for more details
Kindly please help.
Try this.
DZone:
LOAD
Month_noo,
Zone,
Outstanding
From [LIB:..zone.xlsx];
Final:
LOAD
If(peek('Zone')=Zone, peek('Outstanding')< Outstanding, 0) as flag
Resident DZone
ORDER BY Zone,Month_noo;
DROP TABLE DZone;
Try this script, it should work and give you the output in the picture.
flag: LOAD dual(Text,Num) as flag Inline [ Num, Text -1, Y 0, N]; DZone: LOAD * inline [ Month_noo, Zone, Outstanding 3, Delhi, 10000 3, Mumbai, 20000 3, Banglore, 57410 4, Delhi, 25100 4, Mumbai, 7850 4, Banglore, 24568 ]; Final: LOAD Month_noo, Zone, Outstanding, If(peek('Zone')=Zone, peek('Outstanding')< Outstanding, 0) as flag Resident DZone ORDER BY Zone,Month_noo; DROP TABLE DZone, flag;
Hello tried this,but in the flag for all the value it shows 0 as value
Try this.
DZone:
LOAD
Month_noo,
Zone,
Outstanding
From [LIB:..zone.xlsx];
Final:
LOAD
If(peek('Zone')=Zone, peek('Outstanding')< Outstanding, 0) as flag
Resident DZone
ORDER BY Zone,Month_noo;
DROP TABLE DZone;
Try this script, it should work and give you the output in the picture.
flag: LOAD dual(Text,Num) as flag Inline [ Num, Text -1, Y 0, N]; DZone: LOAD * inline [ Month_noo, Zone, Outstanding 3, Delhi, 10000 3, Mumbai, 20000 3, Banglore, 57410 4, Delhi, 25100 4, Mumbai, 7850 4, Banglore, 24568 ]; Final: LOAD Month_noo, Zone, Outstanding, If(peek('Zone')=Zone, peek('Outstanding')< Outstanding, 0) as flag Resident DZone ORDER BY Zone,Month_noo; DROP TABLE DZone, flag;