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

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
abhaysingh
Specialist II
Specialist II

LOGIC HELP

hI,

iN a calendar i have date for whole month, let sat for jan 1 to 31

now i need to check todays date let say, 27 jan 16

than it should calculate less than days , todays days, output is 26 days for jan month.

kindly help

5 Replies
jonathandienst
Partner - Champion III
Partner - Champion III

First load the dates as proper QV date fields, then use something like:

   =  Floor(myDateField) - MonthStart(myDateField)

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Anonymous
Not applicable

use: day(today())-1 gives you 26 for today

Anonymous
Not applicable

like this?

=count({<Date={'>=$(=date(monthstart(today),'YourFormat'))<=$(=date(today,'YourFormat'))'}>} distinct Date)

Peter_Cammaert
Partner - Champion III
Partner - Champion III

Do you want this expression to work only for the current month? Or also for all preceding months?

For example, if today is Feb 4th, the expression needs to return 3 for February and 31 for January?

Anonymous
Not applicable

If it is like Peter Cammaert asked for all preceding months, then replaced today() with max(Date)