Dobieg5750

Multiple Criteria Question

Discussion created by Dobieg5750 on May 11, 2017
Latest reply on May 12, 2017 by philmodjunk

Hey all - just running into an issue and figured I'd poll the community.

 

I'm trying to nail down a better script option to count (& Calculate a field or two) records that meet two criteria.

 

First option is to use: ValueCount ( FilterValues (List ( Instance::Field1 ); "Criteria 1" )) BUT I need to use TWO criteria...(i.e. where Field1 = Criteria1 AND Field2 = Criteria2) - I just can't find an option to use these script options (or similar alternative) to get my result.

 

Second option is to use Portals....the problem is that I need to count how many records show up in Field1 (total records) and then how many show up in Field2 (subset of Field 1) and then calculate the % of Field2.

 

My real example is I have a table of Vote Records - by different legislators who have multiple votes.

 

I first want to nail down the records by the Legislator (Field 1), then how many are "Floor Votes" (Field1) and of those Floor Votes, how many are "Good" votes (voting as we want them to)....so I can determine the Good Voting % of 80% if they have 4 Good votes of a total of 5 Floor Votes (4 Good, 1 Bad).

 

If I could use multiple criteria in the ValueCount/FilterValues/List option above then I could get a count of "Floor" and "Floor/Good" and simply do the math.

 

 

Third option - I can display the counts using Portals (and filtering them) BUT I can't add two separate Portal Fields (not the fields back in the table....the fields as a result of the filtered portals).

 

Anyway, sorry for the incoherent query....hopefully I'm just missing a better/more appropriate Script option or way of adding filtered portal fields.

Outcomes