Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I am trying to count all the barcode number that have an xtype of Eyewash Stations and a retired barcode marked as yes. For some reason I can't get it to work:
Count({< xtype = {'Eyewash Station'}, retired_barcode = {"yes"}>} [building])
And this is my data:
Code looks right. I am guessing there is more to your requirement.
Are you trying to get a count of buildings or barcode ? you code is a count of buildings.
What do you mean by "not working".
please explain in more detail
I had building because I was testing it, but I tried to count by barcode also. I am getting zero count when there you should 1 as a total.
Really what I need to do is count the inventory items that are Eyewash Stations - the inventory that is eyewash station & retired barcode numbers. I counted the inventory excluding the filters week & weekday by using this expression:
Count( {< Week= , WeekDay= , xtype = {'Eyewash Station'} >} barcode_number )
Then I tried to add this to it:
Count( {< Week= , WeekDay= , xtype = {'Eyewash Station'} >} barcode_number )
-
Count({< xtype = {'Eyewash Station'}, retired_barcode = {"yes"}>} [barcode_number])
And it is giving me a zero count.
May be you need aggr function here
Try
Sum(Aggr(
Count({< xtype = {'Eyewash Station'}, retired_barcode = {"yes"}>} [barcode_number])
,Building)
)
Hi thank you, but that just gives me a count of zero each time.
Please post a sample app
I have attached it to my original post. It is under Eyewash stations, inventory.
Thank you!
Hi
When I exported the data to excel and checked, I get 6 records for eyewash and retired _barcode
Eyewash Station | yes | 400933_R |
Eyewash Station | yes | 400982_R |
Eyewash Station | yes | 400994_R |
Eyewash Station | yes | 401156_R |
Eyewash Station | yes | 403704_R |
Eyewash Station | yes | 406829_R |
If you count all Eyewash Stations, you get 568 so your KPI is showing he correct value.. Am I missing something here?