Twd70 Posted September 3, 2008 Posted September 3, 2008 Does anyone know why a summary field would not always give me a result? client_id => foreign key count_cls => count of client_id CountByClient => 1 / ( GetSummary ( count_cls; client_id) ) sum_clients => total of CountByClient As expected: count_cls works all the time. CountByClient works when i sort by Client_id however sum_clients only works after i redefine the field to do exactly the same thing as it currently does (i.e. edit, change nothing, save = works). I have used this method in 6 other tables in my system, however in 2 tables it refuses to work. anyone any ideas?
Søren Dyhr Posted September 3, 2008 Posted September 3, 2008 Neither can I get it to work, to get the count of unique entries do you unfortunately need either the use a script or a custom function: http://www.kevinfrank.com/download/count-unique.zip --sd
comment Posted September 3, 2008 Posted September 3, 2008 I believe it's only a matter of refreshing the cache - if instead of re-defining the field you close the file and re-open it, it will work itself out.
comment Posted September 3, 2008 Posted September 3, 2008 to get the count of unique entries do you unfortunately need either the use a script or a custom function I don't think so: CountUnique.fp7.zip
Søren Dyhr Posted September 4, 2008 Posted September 4, 2008 Ah! Yes so it seems, but only with the option chosen? --sd
comment Posted September 4, 2008 Posted September 4, 2008 I'm afraid I don't understand the question.
Søren Dyhr Posted September 4, 2008 Posted September 4, 2008 (running) ? It should not be a secret I struggled to get my head around the very purpose of adding the reciprocal values of the GetSummary( Was the question originally risen due to reluctance of getting out of browsemode or ?? --sd
comment Posted September 4, 2008 Posted September 4, 2008 It doesn't have to be running - the running part is convenient to show consecutive numbering, but the end result will be the same. On another occasion I said I can only understand how this works on a good day...
Søren Dyhr Posted September 5, 2008 Posted September 5, 2008 I have noticed a certain reluctance from spreadsheet jockeys to get into preveiw mode at all - but give this template a whirl turn off the (running) option off, with various sets - the way the template here works - it's even detects when you unsort the found set! There is a difference IMHO! --sd test.zip
comment Posted September 5, 2008 Posted September 5, 2008 I believe what you see in Browse mode are refresh issues - difficult to see because Refresh Window does not solve them. But try changing the status of sorted/unsorted, then close the file and reopen it, and you'll see that it changes.
Søren Dyhr Posted September 5, 2008 Posted September 5, 2008 I believe what you see in Browse mode are refresh issues Hence my guess as to why the question is raised in the first place! --sd
comment Posted September 5, 2008 Posted September 5, 2008 I don't really know, but I don't think it has to do with the "running" option checked. During the short time I played with this, I have noticed that sometimes it's running version that works, and sometimes the other. Let's just say that this doesn't work well in Browse mode at all.
Søren Dyhr Posted September 5, 2008 Posted September 5, 2008 I can't tell what you do of crash tests, but I wonder if we turn away from the calc' by switching it into a summary field as well? --sd
comment Posted September 5, 2008 Posted September 5, 2008 I don't see how this leads anywhere. You cannot sum a summary, unless you turn into a calculation, and that's exactly what we are doing already.
Søren Dyhr Posted September 6, 2008 Posted September 6, 2008 Then give it a try, it's somehow possible anyway, if the field initially was a calc'field, and the depending fields were established as if they were! This is obviously a omission in the precautions dealing with what is possible at all. Just like the old Ti59 pocket calculator in the 1980'ies from Texas Instruments where you in the scripting could break into the operations stack, or dos batch files where you with a bit of luck could make self modifying code, swiching the nature from being a batch into a .com file. http://en.wikipedia.org/wiki/Self-modifying_code So where this is leading - is dependence on calc'fields more or less reliable than summary fields. Could there be a point in this hack or is the performance the same or even worse? --sd
comment Posted September 6, 2008 Posted September 6, 2008 I'm afraid I have lost track of the purpose here. IMHO, Fraction of Total is not going to work at all, because it will always sum to 1 for each client - and it will do so IN EACH RECORD. So the final sum will always equal the number of records in the found set. CountUnique.fp7.zip
Søren Dyhr Posted September 6, 2008 Posted September 6, 2008 Ha, ha! It seems like you have read this book too - the Sun Zhu for debaters: http://coolhaus.de/art-of-controversy/ or http://en.wikisource.org/wiki/The_Art_of_Being_Right If you like! ...here poke into "18" The bare need to pull in a substantial number of extra fields - which might prove other points no doubt, seems to be such a maneuver! Take a look at the tweak made to my previous template! --sd test-1.zip
comment Posted September 6, 2008 Posted September 6, 2008 I would call it a "hack" instead of "tweak".
comment Posted September 6, 2008 Posted September 6, 2008 Ha, ha! It seems like you have read this book too - the Sun Zhu for debaters No, I haven't, and I don't intend to. I see it says, not far from your reference: for it is with victory that you are concerned, and not with truth. I have no use for such thing.
Søren Dyhr Posted September 6, 2008 Posted September 6, 2008 Oh indeed I did call it a "hack" in one of my previous post's, proper dos batch files shouldn't allow self-modifying code, which it however does. I just stumbled over a funny expression: This kind of design failure doesn't have a traditional name, but one might call it a blivet trap, after an old Army term for the results of attempting to stuff ten pounds of horse manure into a five-pound bag. --sd
Recommended Posts
This topic is 5920 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