Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have variables as follows:
vCurrentYear=Year(Today())
vPreviousYear=Year(Today())-1
The script as:
LOAD | Distinct | ||
[Year Count] as [Year], | |||
[From Month], | |||
[From Month No], |
FROM Calender_Dimension.qvd(qvd)
where Match(year([Calendar Date]),'$(vCurrentYear)','$(vPreviousYear)');
when i reload it is throwing error.
can any 1 tell y?
Hi Prudvi,
Check the below script,
vCurrentYear=Year(Today());
vPreviousYear=Year(Today())-1;
LOAD Distinct
[Year Count] as [Year],
[From Month],
[From Month No]
FROM Calender_Dimension.qvd(qvd)
where Match(year([Calendar Date]),'$(vCurrentYear)','$(vPreviousYear)');
Hi
from where came [Calendar Date] used in match function ?
What is the error message you get? Here, in your share script couple of errors are there. Missing semi colons after variable declaration; unwanted comma after last field in load...are they typo?
pls share ur error with app?
"Calendar Date" is there in ur Calender_Dimension.qvd(qvd)?
from Calender_Dimension
yes
Hi,
First thing i would check your variables are being populated correctly.
Add a Trace after you populate them.
Trace $(vCurrentYear):
Trace $(vPreviousYear);
Mark
Hi, try with this:
let vCurrentYear=Year(Today());
let vPreviousYear=Year(Today())-1;
LOAD | Distinct | ||
[Year Count] as [Year], | |||
[From Month], | |||
[From Month No], |
FROM Calender_Dimension.qvd(qvd)
where Match([Year Count],'$(vCurrentYear)','$(vPreviousYear)');
Elena
can u share ur .qvw?
Hi,
Try like this
Data:
LOAD | Distinct | ||
[Year Count] as [Year], | |||
[From Month], | |||
[From Month No], |
FROM Calender_Dimension.qvd(qvd)
where year([Calendar Date]) >= Year(Today() - 1);
Hope this helps you.
Regards,
jagan.