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

How to do filter before description

Hi All,

Now I have a set of data in QV, just like the following table.

EmployeeSaleMonth
A50Jan
A150Feb
A250Mar
B270Jan
B160Feb
B60Mar
C140Jan
C40Feb
C280Mar

I would like to create a description chart, each employee only could be calculated one time. dimension is sales group ("<100","100<= and <200", "200<= and <300"), expression is number of  employee. Before those condition, How could I modify dimension or expression?

If I use normal way, QV would give me this result:

Sales GroupNumber of employee
<1003
100<= and <2003
200<= and <3003

But I would like to distinct employee and choose the min(sale) first and then get the following result:

Sales GroupNumber of employee
<1001
100<= and <2001
200<= and <3001

How could I get my prefer table?

3 Replies
jagan
Luminary Alumni
Luminary Alumni

Hi,

PFA file for solution.

Not applicable
Author

Hi Jagan,

Thanks so much for you help.

I have a further condition that is there any method could used to write code in expression to order the sale and distinct employee? Since in my real data set, I need to do numbers of steps of filters, and each filter need to do such a description after distinction employee. If use your method, I just could filter in first step.

jagan
Luminary Alumni
Luminary Alumni

Hi,

You can apply any number of conditions, what you have to do is apply my logic at the end of your script.

Regards,

jagan.