Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Today(1) in "set modifier"

Hello,

I've got an issue I can't explain.

I use a set modifier to filter on the today date.

This works fine (with the good date)

=Count( {$< [Code contrat]={'SISU*'},  [Date fermeture.autoCalendar.Date] = {'22/11/2017'} > } [N°]  )

This doesn't work (when I wqnt to select the date of the day)

=Count( {$< [Code contrat]={'SISU*'},  [Date fermeture.autoCalendar.Date] = today(1) > } [N°]  )

I've got the message "Erreur dans l'expresssion" (in french) : "Error in expression"

What I am missing?

1 Solution

Accepted Solutions
shraddha_g
Partner - Master III
Partner - Master III

Try

Count( {$< [Code contrat]={'SISU*'},  [Date fermeture.autoCalendar.Date] = {"$(=date(floor(today(1)),'DD/MM/YYYY'))"} > } [N°] )

View solution in original post

10 Replies
shraddha_g
Partner - Master III
Partner - Master III

Try

Count( {$< [Code contrat]={'SISU*'},  [Date fermeture.autoCalendar.Date] = {$(=today(1))} > } [N°]  )

Anonymous
Not applicable
Author

Hello,

Thank you for you quick reply.

The error disapeared, but it doesn't return a result in my KPI object:

Capture.PNG

When I "harded code" the date string

=Count( {$< [Code contrat]={'SISU*'},  [Date fermeture.autoCalendar.Date] = {'22/11/2017'} > } [N°]  )

, I've got this result :

Capture.PNG

jonathandienst
Partner - Champion III
Partner - Champion III

As above, with bold change

Count({$<[Code contrat] = {'SISU*'}, [Date fermeture.autoCalendar.Date] = {$(=Date(today(1), 'dd/MM/yyyy'))}>} [N°])

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
pradosh_thakur
Master II
Master II

try today(1) in a text box and check the format you are getting. is it DD/MM/YYYY OR MM/DD/YYYY that could be the problem .Make sure it is in DD/MM/YYYY format by using date function.

regards

Pradosh

Learning never stops.
Anonymous
Not applicable
Author

The same result as

no result.PNG

Anonymous
Not applicable
Author

today(1) returns 22/11/2017

shraddha_g
Partner - Master III
Partner - Master III

try,

Count( {$< [Code contrat]={'SISU*'},  [Date fermeture.autoCalendar.Date] = {$(=date(today(1),'DD/MM/YYYY'))} > } [N°]

Anonymous
Not applicable
Author

Same result

no result.PNG

shraddha_g
Partner - Master III
Partner - Master III

Try

Count( {$< [Code contrat]={'SISU*'},  [Date fermeture.autoCalendar.Date] = {"$(=date(floor(today(1)),'DD/MM/YYYY'))"} > } [N°] )