MParker Posted November 17, 2010 Posted November 17, 2010 so, here's what i've got. i need to count any field that contains the number 50 in it. for example, in this column of fields, i would have: 50 100 150 200 250 the result should be 3 in this example. what is the best way of doing this? i have tried to create a calculation field like this: If ( Recommended Load Bill Count = "*50" ; 1 ; 0 ) then had a summary field count them up for the report...but that's not working. so, how do i get it to find any field CONTAINING 50, not necessarily equal to fifty.
comment Posted November 17, 2010 Posted November 17, 2010 You cannot use wild cards in a calculation. Try = PatternCount ( Recommended Load Bill Count ; "50" ) > 0 then SUM this field. Not sure what the purpose is here, though. Should "500" also be counted?
MParker Posted November 17, 2010 Author Posted November 17, 2010 (edited) that worked perfectly! thank you! i'm going to have to look into that function a bit more. that's what i love about fmp.....you learn something new every day. edit: wait....spoke too soon. no, 500 should not count. and the total is off. i just put it on the report and the total is reading 63 when it should read 8. let me look into this a bit more. Edited November 17, 2010 by Guest
TheTominator Posted November 17, 2010 Posted November 17, 2010 How about only looking at the last 2 digits? If ( Right(Recommended Load Bill Count; 2) = "50" ; 1 ; 0 )
MParker Posted November 17, 2010 Author Posted November 17, 2010 yup! that's it. and i'm stupid sometimes. the summary wasn't working because for some idiotic reason, my brain lapsed and i made it COUNT, not TOTAL. blonde moment.
Recommended Posts
This topic is 5178 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now