Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
Anybody knows how can I hide the current Month from my chart or from all my load..
I am loading data per year but I want to show everything untill previous month.
Thxs
I have used this:
load
Month,
Year,
Value
from abc.qvd where monthname(makedate(Year,Month)) < monthname(today()+180);
Hi,
If you want to restrict in load use in where Clause as
Where DataField <MonthStart(Today());
Or
In Expression use
Sum({<DateField={"<=$(=MonthStart(Today()))"}>} FieldName)
Celambarasan
Hi,
While loading data itself you can put a condition in your load statement such as
if your load statement is something like
load
Month,
Year,
Value
from abc.qvd ;
then change it to
load
Month,
Year,
Value
from abc.qvd where monthname(makedate(Year,Month)) < monthname(today());
Let me know if any issue.
..
Ashutosh
This sounds good but one of my issues is that My MONTH field and YEAR are Fiscal and our Fiscal year starts on JULY so JULY is the first Month..
It will be great if you can help me.
Thxs so much
MonthMap:
Mapping
Load * Inline [
MONTH,MonthName
1, Jul
2, Aug
3, Sep
4, Oct
5, Nov
6, Dec
7, Jan
8, Feb
9, Mar
10, Apr
11, May
12, Jun];
Try using InYear() in your load script. You can specifiy the first month of the year and it is designed just for this use.
Hope this helps,
Jason
Hi,
Thank you for the reply..
Do you have any examples of that?
Regards,
I have used this:
load
Month,
Year,
Value
from abc.qvd where monthname(makedate(Year,Month)) < monthname(today()+180);
Hi Badr,
While this solution seems to work but I would suggest you to change it to
load
Month,
Year,
Value
from abc.qvd where monthname(makedate(Year,Month)) < monthname(addmonths(today(),6));
Because using 180 +days may give incorrect results especially with february month. For example if you add 180 days then both the 28 Feb and 1 Mar will give you August month, which I believe you don't want.
But this addmonths function will always give you correct results.
..
Ashutosh