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: 
Not applicable

doubt in expression =count({<MaxString(Month=$(=max(month)), Date=min(Date)),mrNEWFIELDVALUE={'Open'}>}mrID)

I am using this expression for getting the start of the month but getting error in expression can anyone guide me on this

=count({<MaxString(Month=$(=max(month)), Date=min(Date)),mrNEWFIELDVALUE={'Open'}>}mrID)

4 Replies
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Try Month={'$(=max(month))'} instead of MaxString(Month=$(=max(month)) and Date={'$(=min(Date))'} instead of Date=min(Date)). If that doesn't work your month probably is a string. In that case you'll have to fix that in the script so your months are numbers (or dual values with a text and a number value). Using the Month() function on a date field is the best way to create a month field.


talk is cheap, supply exceeds demand
Not applicable
Author

try this

=count({<Month={"$(=max(month))"}, Date={"$(=min(Date))"},mrNEWFIELDVALUE={'Open'}>}mrID)

Not applicable
Author

=count({<MaxString(Month={'$(=max(month))'}, Date=min(Date)),mrNEWFIELDVALUE={'Open'}>}mrID)

do you suggest this it is not working

and my month field is text it shows Jan Feb Mar......

i crated month from the date which is in this format

YYYY-MM-DD

Not applicable
Author

used it i am getting 0 value for all

=count({<Month={"$(=max(Month))"}, Date={"$(=min(Date))"},mrNEWFIELDVALUE={'Open'}>}mrID)