Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All
Is there anyway to evaluate formula from InLine statement?
Based on vCurrPrd selection calculating four dimension
Where vCurrPrd can be 30/09/2014 or 31/12/2014 in Date format
QtrNewDim:
LOAD * INLINE [
QtrNDim
'Q' & Ceil(Month(AddMonths(vCurrPrd,3))/3) & '-' & Right(Year(AddMonths(vCurrPrd,3)),2)
'Q' & Ceil(Month(AddMonths(vCurrPrd,6))/3) & '-' & Right(Year(AddMonths(vCurrPrd,6)),2)
'Q' & Ceil(Month(AddMonths(vCurrPrd,9))/3) & '-' & Right(Year(AddMonths(vCurrPrd,9)),2)
'Q' & Ceil(Month(AddMonths(vCurrPrd,12))/3) & '-' & Right(Year(AddMonths(vCurrPrd,12)),2)
];
Thanks to all
++
Based on vCurrPrd selection calculating four Quarters (Not Dimension)
Have a look at the QlikView Evaluate() function.
Hi Bill
I am getting none with below scripting. Do I forget any in below script?
I have used = sign at begining too.
Thanks for your valuable reply
QtrSourceDim:
LOAD * INLINE [
QtrNDim
'Q' & Ceil(Month(AddMonths(vCurrPrd,3))/3) & '-' & Right(Year(AddMonths(vCurrPrd,3)),2)
'Q' & Ceil(Month(AddMonths(vCurrPrd,6))/3) & '-' & Right(Year(AddMonths(vCurrPrd,6)),2)
'Q' & Ceil(Month(AddMonths(vCurrPrd,9))/3) & '-' & Right(Year(AddMonths(vCurrPrd,9)),2)
'Q' & Ceil(Month(AddMonths(vCurrPrd,12))/3) & '-' & Right(Year(AddMonths(vCurrPrd,12)),2)
];
QtrTargetDim:
LOAD evaluate(QtrNDim) As NewQtrs
Resident QtrSourceDim;
Set vCurrPrd='41912';
Load A,B,'Q' & A & '-' & B As QtrNDim;
LOAD Evaluate(A) As A,Evaluate(B) As B INLINE [
A,B
'Ceil(Month(AddMonths($(vCurrPrd),3))/3)', 'Right(Year(AddMonths($(vCurrPrd),3)),2)'
'Ceil(Month(AddMonths($(vCurrPrd),6))/3)', 'Right(Year(AddMonths($(vCurrPrd),6)),2)'
'Ceil(Month(AddMonths($(vCurrPrd),9))/3)', 'Right(Year(AddMonths($(vCurrPrd),9)),2)'
'Ceil(Month(AddMonths($(vCurrPrd),12))/3)', 'Right(Year(AddMonths($(vCurrPrd),12)),2)'
];
Helpful answer, Thanks Anbu