Hi All,
I think I'm misunderstanding how the STAT function works and could really benefit from your expertise.
I have 3 attributes:
Warehouse = [Attribute.Warehouse]
Location = [Attribute.Location]
Container = [Attribute.Container]
The hierarchy is as follows. A Warehouse can have several Locations which in turn can have several Containers. Each Container has a value associated with it, given by the measure [Date: Sum: Quantity].
What I would like to be able to do is display the number of Containers per Location per Warehouse that have quantity greater than 0, essentially [Date: Sum: Quantity] > 0.
Based on the documentation and some posts on the community I have managed to put together the following BQL Expression:
STAT(COUNT,
0,
[Attribute.Location],
[Attribute.Warehouse],
SELECT [Attribute.Container],
[Date: Sum: Quantity] FROM [ALL] WHERE [Date: Sum: Quantity] > 0)
This is the output:

The number of containers I am getting per location is repeated and is the total number of containers with value >0 across all locations rather than the number per location.
If anybody here could give me a second pair of eyes on this it would really help!
Thanks in advance for your help.
Kind Regards,
Usman