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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
helen_pip
Creator III
Creator III

Help with minimum month in an expression

Hello

I am trying to build a table which show data for the current month.  I want to be able to write the current month into the expression, as the table will eventually be used in a report,

Can anyone help me write the correct syntex as at the moment I am not getting back any results

 

=

COUNT(If(Month=Monthstart(AddMonths( min({1}Month),0)) and data_source_diag='inpatients',ur_number))

Any help is appreciated

Thanks

Helen

2 Replies
Not applicable

Hey Helen,

If the problem is about stating the current month in the expression why to use so many functions,

COUNT(If(Month(FIELDNAME)=Month(Today()))) and data_source_diag='inpatients',ur_number))

if i didnt got / detect ur issue let me know.


helen_pip
Creator III
Creator III
Author

Hello,

Thank you for your response, your suggestion does work, however I would also need an additional table which will show data for the next month

I.e. I have May 2013, June 2013 and July 2013 data in my dataset

The code you have kindly given me will help me with data for the current month, however how would I show data for next month using a similar code?

At no point would I want the table to show the data in July 2013 and I only ever want to show current month and next month's data

Thanks

Helen