Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I want to have multiple true values for a condition in if statement in qliksense
ex-
quarter previous quarters
3 1
2
please help me with the problem
Hi Siddhart,
If I understood your question, you need to create a table with previous quarters based on quarter values.
The following script:
x:
Load * Inline
[
Quarter
1
2
3
4
];
y:
Load
Quarter,
if (Quarter=1,Null(),IterNo()) as [Previous Quarter]
Resident x
While IterNo() <=Quarter;
drop table x;
NoConcatenate
data:
Load
Quarter,
[Previous Quarter]
Resident y
where Quarter <> [Previous Quarter];
drop table y;
Gets the following output:
Since you now have the Quarter and Previous Quarter mapped out, now you could do the if statement on the new field.
Is that what you need?
Hi Siddhart,
If I understood your question, you need to create a table with previous quarters based on quarter values.
The following script:
x:
Load * Inline
[
Quarter
1
2
3
4
];
y:
Load
Quarter,
if (Quarter=1,Null(),IterNo()) as [Previous Quarter]
Resident x
While IterNo() <=Quarter;
drop table x;
NoConcatenate
data:
Load
Quarter,
[Previous Quarter]
Resident y
where Quarter <> [Previous Quarter];
drop table y;
Gets the following output:
Since you now have the Quarter and Previous Quarter mapped out, now you could do the if statement on the new field.
Is that what you need?