Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Discover how organizations are unlocking new revenue streams: Watch here
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Evaluate InLine Formula

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


5 Replies
Anonymous
Not applicable
Author

++

Based on vCurrPrd selection calculating four Quarters (Not Dimension)

Anonymous
Not applicable
Author

Have a look at the QlikView Evaluate() function.

Anonymous
Not applicable
Author

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;


anbu1984
Master III
Master III

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)'

];

Anonymous
Not applicable
Author

Helpful answer, Thanks Anbu