Discussion Board for collaboration related to QlikView App Development.
Hi everyone,
I have a column of data which contains multiple order numbers. I am using set analysis to count the total number of orders based on their status, either open or closed. Here is my expression:
count(Distinct{$<[PO Status2]={"O"}>} po_NUMBER_ITEM)
Where [PO Status2] is the order status and po_NUMBER_ITEM is the order number. I have the same expression for [PO Status2]="C" to count the closed orders. Both expressions calculate the totals correctly and are used in a gauge chart.
I have a list box where I can select either the open or closed orders. I would like for the total in my gauge chart to change based on the order status selected. For example, if I select "O" I would expect the total number of closed orders to show 0 and if I select "C" I want the total number of open orders to show 0. As it is right now however, the total does not changed based on the status selected.
I thought using the $ identifier would allow the expression to change based on the values selected but it looks like that is not working.
A sample qvw file is attached. Any idea what I'm doing wrong?
Thanks in advance.
Michael
Check out the attached
Open: Count(Distinct{$<[PO Status2] -={"C"}>} po_NUMBER_ITEM)
Closed: Count(Distinct{$<[PO Status2]-={"O"}>} po_NUMBER_ITEM)
Check out the attached
Open: Count(Distinct{$<[PO Status2] -={"C"}>} po_NUMBER_ITEM)
Closed: Count(Distinct{$<[PO Status2]-={"O"}>} po_NUMBER_ITEM)
This is it?
That's because your field modifier is using a constant value, overriding user selections.
As a general rule, if you want to consider user selections, use the intersection operator *
Open:
count(Distinct{$<[PO Status2] *= {'O'}>} po_NUMBER_ITEM)
Close:
count(Distinct{$<[PO Status2] *= {'C'}>} po_NUMBER_ITEM)