Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi, QlikView community
I using the count function to count containers in logistic company.
Here below is my datasets with four fields.
I am trying to count number of containers.
In this datasets I want the answear to be 3 containers. I want to know how many containers where used in every order for the whole time.
I know I can use Count (Distinct OrderID) to get the same result but I want to count the containers in the Containers field.
I was trying to use formula Count (Distinct Containers) but that is not possible because we use the same container for differenct Order ID in the dataset.
Do you guys know of any easy solution to count the containers so I can get 1 container for every month and when I sum the dataset I get 3 like in the formula Count (Distinct OrderID)
Regards Darri
Payer | Containers | OrderID | YrPer |
COCA-COLA | TGHU0968334 | 100 | 2017-01 |
COCA-COLA | TGHU0968334 | 100 | 2017-02 |
COCA-COLA | TGHU0968334 | 100 | 2017-03 |
COCA-COLA | TGHU0968334 | 100 | 2017-04 |
COCA-COLA | TGHU0968334 | 100 | 2017-05 |
COCA-COLA | TRHU3070551 | 200 | 2017-01 |
COCA-COLA | TRHU3070551 | 200 | 2017-02 |
COCA-COLA | TGHU0968334 | 300 | 2017-08 |
COCA-COLA | TGHU0968334 | 300 | 2017-09 |
but I want to count the containers in the Containers field.
Count of containers in the container field? Can you elaborate on this?
Hi,
what I mean is I want to count the numbers of container in the dataset and use the count function.
If I use Count (Containers) I will get total of 9 containers because there are 9 lines.
If I use Count (Distinct Containers) the answer will be 2 because there are two different containers in the dataset.
But I am looking to find numbers of containers that are used for every order ID.
I could use the formula Count( DISTINCT OrderID) then I would get the answear I am looking for.
But I am looking for formula that counts the containers with the same result as counting the orderID
Try this
=Count(DISTINCT Containers&OrderID)