Select to view content in your preferred language

Data Expression for Indicator/List in Dashboard

220
0
02-22-2024 01:11 PM
Labels (1)
EvanTimms
New Contributor II

I have a survey123 form that is populating a dashboard used for structure protection. The form has a repeat in it where the user can go in, enter information about the property/structure, and then add a repeat in if the water source is coming from a pump. If the pump is deployed, the user will set pump_status to Current, and then if it is retired, they will add a repeat and set the pump_status to Retired.

In the data table for the pumps, I have included the following fields:

EvanTimms_0-1708635349995.png

track_pump - unique ID so that I can relate the property information from the main table to the pump (client required). Includes a concatenation of fields, including an address.

CreationDate - autogenerated

pump_status - user fills out whether the pump is Current or Retired using a repeat.

property_status_current_pump - calculated in the survey, based on what the user had entered as the property status. Property status is it's own repeat and moves from Triaged to Protected to Demobilized, based on the level of protection required.

 

In short , what I would like to do is take the list of pump features, and sort them by the address that is in the track_pump. Each address will eventually have two entries - one for Current, when the structure is Protected, and one for Retired, when the structure is Demobilized. I would like to take this list of pump features sorted by address, and then if the address has a pump that is Current and does not have an address that is Retired, then add it to the list. If the address has a pump that is Current and the pump at the same address has been Retired, I don't want to include it in the list. I am looking for a count of how many pumps are only Current, and none of those which have both Current and Demobilized.

Thank you!

 

0 Kudos
0 Replies