Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
Now I have a set of data in QV, just like the following table.
Employee | Sale | Month |
---|---|---|
A | 50 | Jan |
A | 150 | Feb |
A | 250 | Mar |
B | 270 | Jan |
B | 160 | Feb |
B | 60 | Mar |
C | 140 | Jan |
C | 40 | Feb |
C | 280 | Mar |
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 Group | Number of employee |
---|---|
<100 | 3 |
100<= and <200 | 3 |
200<= and <300 | 3 |
But I would like to distinct employee and choose the min(sale) first and then get the following result:
Sales Group | Number of employee |
---|---|
<100 | 1 |
100<= and <200 | 1 |
200<= and <300 | 1 |
How could I get my prefer table?
Hi,
PFA file for solution.
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.
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.