I think you are looking to group by the Job Ref field to get the number your after. Aggr should work in this case:
aggr(Count (DISTINCT [Container Number]), [Job Ref])
More info on aggr: http://community.qlik.com/thread/38796
this is not what I am looking for exactly.
I am only looking for some expression that can help find the total number when I
have the same container number over a period.
When I use DISTINCT in an expression and have same container number over a period the total number uses the DISTINCT function and in the example I get total numbers of container is 1 but the container was used 4 times not once
If I understand you correctly, you want to count not the number of containers, but the number of combinations of containers and job references? I.e. If the same container has been used on 4 jobs, it should be counted four times.
If so, you should use
Count (DISTINCT [Container Number] & [Job Ref] )
You can probably do it with Aggr() too, but then you need to wrap Aggr() in an aggregation function, e.g.
Sum(Aggr(Count (DISTINCT [Container Number]), [Job Ref] ))