3 Replies Latest reply: Nov 26, 2015 10:06 AM by Sunny Talwar

# Struggling with what i think may be an easy expression

Hi

I’m struggling with an expression. I am trying to count the number of people that fit a specified criteria for a high level figure to be obtained in an object box.

This is what I have been doing in the text box but it doesn't work:

=if(today()-max(DateOfIssue)<=30,count({\$<Skill={'Pro'},Role={'to apply'}>} Name)

In a chart, I added Name to the dimension, and the following expression to obtain the number of days from dateofissue to today:

=if(DateOfIssue-Today()<='0', '0', Today()-Max(DateOfIssue)

When I produce a chart, I am able to get the results that I want but using the expression isn't working, when I need an exact count in the text box. What am I doing wrong?

Any help would be appreciated

• ###### Re: Struggling with what i think may be an easy expression

Try one of these:

=Count({\$<Skill={'Pro'},Role={'to apply'}>} If(Today() - Max(DateOfIssue) <= 30, Name))

or

=Count(Aggr(if(today()-max(DateOfIssue)<=30,count({\$<Skill={'Pro'},Role={'to apply'}>} Name), YourChart'sDimensionsHere))

• ###### Re: Struggling with what i think may be an easy expression

Hi Sunny,

I tried to use your formula.  It does give an outcome but fails to count on the 30 days condition.  I tried this:

=count({\$<Skill={'Pro'}, Role={'to apply'}, vNoOfDays>=30>}, Name)

vNoOfDays is a variable set to Today() -Max(DateOfIssue).

I'm getting an error on the formula.

To give some context, I'm trying to count on all the conditions with in the set analysis. So we have 140 people at 'Pro' Skill level and 40 of these are outside 30 days from issue. but I still get the 140 figure when I use your formulas.