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

Announcements
Save $650 on Qlik Connect, Dec 1 - 7, our lowest price of the year. Register with code CYBERWEEK: Register
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Hide current Month from my Chart

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

1 Solution

Accepted Solutions
Not applicable
Author

I have used this:

load

     Month,

     Year,

     Value

from abc.qvd where monthname(makedate(Year,Month)) < monthname(today()+180);

View solution in original post

7 Replies
CELAMBARASAN
Partner - Champion
Partner - Champion

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

Not applicable
Author

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

Not applicable
Author

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];

Jason_Michaelides
Partner - Master II
Partner - Master II

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

Not applicable
Author

Hi,

Thank you for the reply..

Do you have any examples of that?

Regards,

Not applicable
Author

I have used this:

load

     Month,

     Year,

     Value

from abc.qvd where monthname(makedate(Year,Month)) < monthname(today()+180);

Not applicable
Author

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