Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
qlikofba
Contributor II
Contributor II

Help with expressions

Hi I want to create a Chart similar to below

Name |      Sales People    |    Total Sales

New York         10             8

New Jersey       15           5

California       9           6

The dimension would be state,

Sales would be count(salesPersonID) as of yesterday

Total sales would be the distinct amount of each person who made a sale(who still work as of today-1)

E.g.

-10 sales people work in new york,  8 of them have made sales(dont care if they made multiple).

-NY could have had 2 additional employees who got fired last week who both have made a sale (making it 10, rather than 😎 they are not included since they arent working as of yesterday

I cant seem to come up with the correct expressions and need help creating them.

1 Reply
Anonymous
Not applicable

you can create one flag in script with condition

if( working =1,1,0) as flagworking

where working = its a field which will define if person is fired or not. this should come from database.

Then in expression you can use : count({<flagworking={1}>}distint sales people)