Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I need take the Max Date of a table (Master Cube table below) and use that date in my where clause for another table.
I know my script is NOT right below. But how do I get the vGLDATE field from the Master Cube into the Where clause of my Current Budget table
Master Cube:
Load
max(GLDATE) as vGLDATE
Resident Production;
Current Budget:
Load *
Resident Budget
Where vGLDATE < BUDGET_DATE;
Thanks,
Steve
Hi,
Try:
Master Cube:
Load
max(GLDATE) as vGLDATE
Resident Production;
LET vGLDATE = Peek('vGLDATE', 0, 'Master Cube')
Current Budget:
Load *
Resident Budget
Where $(vGLDATE) < BUDGET_DATE;
Best,
Aurélien
Hi,
Try:
Master Cube:
Load
max(GLDATE) as vGLDATE
Resident Production;
LET vGLDATE = Peek('vGLDATE', 0, 'Master Cube')
Current Budget:
Load *
Resident Budget
Where $(vGLDATE) < BUDGET_DATE;
Best,
Aurélien
Thanks so much.
Just some clairification
LET vGLDATE = Peek('vGLDATE,0,"Master Cube")
What is the peek function doing? Is it saying look at the last vGLDATE and if you find nothing make it a 0 or therwise give me the date?
Thanks, Steve
When you use Peek function like : Peek('vGLDATE,0,"Master Cube")
Peek returns the value of vGLDATE from the first record read into the input table labeled Master Cube.
Read "Inter Record Functions" in QlikView Help