Skip to main content
Announcements
Accelerate Your Success: Fuel your data and AI journey with the right services, delivered by our experts. Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
jbakerstull
Creator
Creator

Count a specific value

I'm trying to count a specific value where the "Exit Household value equals to yes.

In the formula below, I'm trying to show in a KPI, "Emergency shelter, including hotel or motel paid for with emergency shelter voucher (HUD)" value of 7.  The formula below returns a zero value.

Formula

=Sum(Aggr(If([Exit Date] = Max(TOTAL <[Client Id]> Floor(Num([Exit Date Adjusted])))

and Max(TOTAL <[Client Id]> Floor(Num([Entry Date]))) = [Entry Date] And

if([Exit Destination]='Emergency shelter, including hotel or motel paid for with emergency shelter voucher (HUD)')

, 1, 0), [Client Id], [Exit Date],[Exit Destination]))

    Pivot Table

Exit DestinationExited HouseholdYesNo
Emergency shelter, including hotel or motel paid for with emergency shelter voucher (HUD)7-
Hospital or other residential non-psychiatric medical facility (HUD)2-
Hotel or motel paid for without emergency shelter voucher (HUD)1-
No exit interview completed (HUD)495
Other (HUD) - 2-
Permanent housing (other than RRH) for formerly homeless persons (HUD)4-
Place not meant for habitation (HUD)846
Psychiatric hospital or other psychiatric facility (HUD)1-
Rental by client, no ongoing housing subsidy (HUD)57-
Rental by client, with other ongoing housing subsidy (HUD)1-
Rental by client, with RRH or equivalent subsidy (HUD)5-
Staying or living with family, permanent tenure (HUD)2-
Staying or living with family, temporary tenure (e.g., room, apartment or house)(HUD)24-
Staying or living with friends, temporary tenure (e.g., room apartment or house)(HUD)91
Transitional housing for homeless persons (including homeless youth) (HUD)1-
1 Solution

Accepted Solutions
jbakerstull
Creator
Creator
Author

I figured it out.

=Sum(Aggr(If([Exit Date] = Max(TOTAL <[Client Id]> Floor(Num([Exit Date Adjusted])))

and Max(TOTAL <[Client Id]> Floor(Num([Entry Date]))) = [Entry Date] And

[Exit Destination]='Emergency shelter, including hotel or motel paid for with emergency shelter voucher (HUD)'

, 1, 0), [Client Id], [Exit Date],[Exit Destination]))

View solution in original post

1 Reply
jbakerstull
Creator
Creator
Author

I figured it out.

=Sum(Aggr(If([Exit Date] = Max(TOTAL <[Client Id]> Floor(Num([Exit Date Adjusted])))

and Max(TOTAL <[Client Id]> Floor(Num([Entry Date]))) = [Entry Date] And

[Exit Destination]='Emergency shelter, including hotel or motel paid for with emergency shelter voucher (HUD)'

, 1, 0), [Client Id], [Exit Date],[Exit Destination]))