Announcements
The way to achieve your own success is the willingness to help somebody else. Go for it!
cancel
Showing results for
Did you mean:
Partner - Contributor III

## Help with COUNT of FIELD equal to specific value

Here's what I'm hoping to display in KPI: Count({[Priority] = '3 - Medium'})

Field is "Priority" and wanting to count number of times it's equal to "3 - Medium"

I know this is so easy for you folks - hoping someone can clarify this for me.  I'm just starting out (as you can tell)...

1 Solution

Accepted Solutions
MVP

Hi Wes,

Count(Priority) is the original expression.

Now we do not want to count all that exists in Priority, but only certain values.

To do that we add our condition in a set expression:

1) first step: we  automatically add this (it's a syntax thing):

Count({<>}Priority)

2) Now we will put our condition within it: the [Priority] = '3 - Medium' thing:

Count({<Priority={}>}Priority)

3)Now, depends on the condition, we might add quotes or double quotes;

-Let me explain; if we were working with field Year, and we want to just work with Year 2017, since it's a numeric value:

Year={2017} without quotes

-If we work with a string, let's say country = Tunisia , we surround it with quotes:

Country={'Tunisia'}

-If it's an expression (the max year for example), we surround it by double quotes:

Year= {"max(Year)"}

Now, since it's a calculation; (the max), it's demands a '='; and the '=' demands a '\$' sign to return the outcome of the calculation:

Year= {"\$(=max(Year))"}

Now, in our case, we work with a string; so our expression will be

from;

Count({<Priority={}>}Priority)

To:

Count({<Priority={'3-Medium'}>}Priority)

Hope that was rather clear

10 Replies
Creator III

Try

or for both

MVP

Try like:

Count({<[Priority] = {'3 - Medium'}>} [Priority] )

MVP

Hi Wes,

Count(Priority) is the original expression.

Now we do not want to count all that exists in Priority, but only certain values.

To do that we add our condition in a set expression:

1) first step: we  automatically add this (it's a syntax thing):

Count({<>}Priority)

2) Now we will put our condition within it: the [Priority] = '3 - Medium' thing:

Count({<Priority={}>}Priority)

3)Now, depends on the condition, we might add quotes or double quotes;

-Let me explain; if we were working with field Year, and we want to just work with Year 2017, since it's a numeric value:

Year={2017} without quotes

-If we work with a string, let's say country = Tunisia , we surround it with quotes:

Country={'Tunisia'}

-If it's an expression (the max year for example), we surround it by double quotes:

Year= {"max(Year)"}

Now, since it's a calculation; (the max), it's demands a '='; and the '=' demands a '\$' sign to return the outcome of the calculation:

Year= {"\$(=max(Year))"}

Now, in our case, we work with a string; so our expression will be

from;

Count({<Priority={}>}Priority)

To:

Count({<Priority={'3-Medium'}>}Priority)

Hope that was rather clear

Partner - Contributor III
Author

Thanks all for the great guidance!  This was exactly what I needed.

MVP

Have a nice day,

Omar,

Creator II

Thanks for putting it so clearly.

Specialist

good one omar

Specialist

omar can you pls expalin the null value in  set analysis like simple easy understandable step by step explanation.

pls

Contributor III

OmarBenSalem

Thanks for this post it has been very helpful.

I have a similar issue I am hoping you can help with please.

Instead of priority I want to count the number of entries, where the difference between two dates is greater than 1. Something like:

Count({<EndDate-StartDate>{'1'}>}EndDate-StartDate)

Thanks

Ben

Tags
Community Browser