Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
HI All ,
I have a requirement , showing previour periods data on selection like one month and Quarters
Exp:
If i slect Year=2018, I have Q1 and Q2 ,
For Q1 , Values should be Q4 of 2017.
For Q2 , Values should be Q1 of 2018.
If i slect Year=2017, I have Q1 , Q2 , Q3 and Q4
For Q1 , Values should be Q4 of 2016.
For Q2 , Values should be Q1 of 2017.
For Q3 , Values should be Q2 of 2017.
For Q4 , Values should be Q3 of 2017. and so on...
Is it possible to achieve this in qlikview.
Hi All,
Is it possible to achieve this ?
Hi,
try with below script
Data:
Load *,
'Q'&if(Right(Quarter,1)=4,1,Right(Quarter,1)+1) as newQ,
if(Right(Quarter,1)=4,Year+1,Year) as NewYear;
LOAD Year,
Quarter,
Month,
Exp
FROM
Data.xlsx
(ooxml, embedded labels, table is Sheet1);
Use NewQ and newYear for your reference.
Regards
Hi Subbareddy,
Prashant is right...
You can use this also,
'Q'&if(Right(Quarter,1)=1,4,Right(Quarter,1)-1) as newQ,
if(Right(Quarter,1)=1,Year-1,Year) as NewYear;
create alternate state select different selection like
Year=2018 and Quarter=Q1 in inherit state
NewYear=2017 and NewQ=Q4 in state A
take two separate text box use Expression: sum(Exp) anyone to use alternate state A
Both values are match..
Yah , this is working fine for Previous Quater and i am using column as column one ,
also i have one more column for Current Quarter, If i show two columns and i select the Year its not working fine.
Exp
If i select the 2018
Quarter | Current | Prev | Logic |
Q1 | 100 | 300 | Q4 2017 |
Q2 | 200 | 100 | Q1 2018 |