Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to write expression to Count([Job ID]) by another dimension

Hi all,

Here's what i'm trying to achieve.

I have a list of jobs. I can count the number of jobs by using Count([Job ID]) as the expression. I'm creating a table that shows those counts as the expression with a dimension of Zone Name. But of those jobs, some were completed, some were cancelled and some were lost. I want to create a table with columns for each of those, so like a column with Count([Job ID]) for completed, another column with Count([Job ID]) for cancelled and another column with Count([Job ID]) for closed.

I know this is probably incredibly simple, but i'm just not sure about the syntax for how to write the expression. Can someone help me?

Thank you!

Chris

1 Solution

Accepted Solutions
groveliam
Creator
Creator

I don't know what your field is called so lets say Status can be completed or closed.

Count({<Status = {'completed'}>}[Job ID])

Count({<Status = {'closed'}>}[Job ID])

View solution in original post

4 Replies
groveliam
Creator
Creator

I don't know what your field is called so lets say Status can be completed or closed.

Count({<Status = {'completed'}>}[Job ID])

Count({<Status = {'closed'}>}[Job ID])

PabloTrevisan
Partner - Creator II
Partner - Creator II

You can use

Count({<Status = {'completed'}>}distinct [Job ID]) to count only one for each ID.

Anonymous
Not applicable
Author

Thank you. Do you feel like taking it a step farther for me? I also then want to be able to create another column that measures the completion percentage. So this would simply be the Completed column we just created, divided by the total column that I already had that is just Count([Job ID]).

Do you know how I can write this and display it as a percentage?

groveliam
Creator
Creator

Gotcha

Count({<Status = {'completed'}>}[Job ID]) / Count([Job ID])