
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Display the data of the current month
Hello all,
I try to display the data of the current month from my straight table using only "expression".
So, I wrote the following expression:
=if(MonthName(addmonths(today(),-1))<=DATE,Custom)
But, my criteria is not considered.
Please could you advise me how I can display only the data from the current month using expression.
Thank you in advance for your help.
- « Previous Replies
-
- 1
- 2
- Next Replies »

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello all,
Anyone to help me to resolve this request ??
Thank you in advance for your help.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
can you describe your problem more in detail?
does your table is empty (no rows?) or does it shows "-" in Custom column or does it show all rows?
The date format of monthname(....) and DATE are identical?
your expression would deliver all data from begin of previous month upto today (if expression would work)
if you want only data from current month, I would use monthstart instead of addmonths

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello @Anonymous ,
Thank you for your reply.
My problem is that my expression displays all the rows (it's like the filter date is not considered).
I hope it's more clear.
Thank you in advance for your help.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
check if the expression =if(MonthName(addmonths(today(),-1))<=DATE (put it in a textobject)
works for single data. select one row (one DATE) and see if the condition is true

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello @Anonymous ,
I try it.
But, I should precise the date thanks to a listbox.
However, I would like to display directly the count of the data of the current month without specifying the date.
Below, my current configuration to display the count of data in the current month:
Please could you tell me if it's possible that my expression count automatically the data for the current month without specifying each time the date.
Thank you in advance for your help.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
you need to use set analysis, if you want ALWAYS the count of the current month independant from date selection (even if no date was selected)
count({<Month={$(=date(today(),'YYYY-MM')}>}yourfield)

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re @Anonymous ,
I try your solution but in my graph, I have a message saying "No data to display"
I'm not sure but maybe I should create the variable Month in my script.
Have you created the variable Month in your Editor Script ?
Thank you in advance for your help.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm trying to understand your issue. Maybe you can do something like this. The expression used in the pie chart is in the bluegreen text box. See attached qvw file.
Qlik Community MVP

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
in the qvw from Vegar you need to adapt the expression to:
count({<YearMonth= {"$(=date(today(),'MMM YYYY'))"}>}Answer)
will show you always the current month (today may numbers, next week june numbers)
The format I told earlier was different as I saw now MMM YYYY instead of YYYY-MM as shown in listbox

- « Previous Replies
-
- 1
- 2
- Next Replies »