Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
hopkinsc
Partner - Specialist III
Partner - Specialist III

expression help!!

Hi all,

I am trying to calculate how many days in the current month have a [Visit_ID] of 4 but i can't seem to find the answer.

Can anyone help please?

5 Replies
MayilVahanan

Hi

Try like this

Count({<Visit_ID = {4}, Month={'$(=Month(Today()))'}>} Days)

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
hopkinsc
Partner - Specialist III
Partner - Specialist III
Author

Hi, thanks,I don't have a field for Days, and the month needs to be taken from a date field..

here is what i want in a bit more detail...

i want to see which salesmen have worked full or half day.

A full days work is equal to them doing 4 visits, and a half day is them doing 2 visits per day..

I have attached a sample..

so what i want is a variable to show if the salesman have done a full days work (4 visits) or half days work (2 visits) for the current month

hopkinsc
Partner - Specialist III
Partner - Specialist III
Author

Does anyone know the answer to this?

Not applicable

Hi Try this:

Create a simple table with the dimensions:

  • Salesman
  • Calculated dimension: Month(Date)

then add the next expression:

  • count({<'Month(Date)='>} Visit_ID)/4

So you will have days worked by Salesman and by month.

I attached the .qvw with the example.

maxgro
MVP
MVP

count( {$ <Date={">=$(=MonthStart(Today()))<=$(=MonthEnd(Today()))"}> } Visit_ID) / 4

1.png