September 26, 201213 yr Hoi Can i make a calculation repeat? Something like Repeat ( Count ; Calculation ) So That Repeat ( "5" ; "2" * Count ) will give me 2 4 6 8 10 It sound simple to me but i can't figure it out.... I hope somebody can help me out.. Thx
September 26, 201213 yr Since you have the Advanced version, you can write a recursive custom function. I am afraid I didn't understand the logic behind your example.
September 26, 201213 yr Author Ok i'll try to explane a bit beter... What i want is the function in the exemple to do this: - You set the times the calculation shoot repeat by count - And in the calculation count will count from 1 to 5 So it looks like First run Count = 1 so 2 * 1 = 1 Second run Count = 2 so 2 * 2 = 6 third run Count = 3 so 2 * 3 = 6 Foured run Count = 4 so 2 * 4 = 8 and the fived run count = 5 so 2 * 5 = 10 Is this possible?
September 26, 201213 yr it's possible, but not exactly simple, because while a custom function does count the iterations, it does not reveal the count to be used in the formula. Have a look at: http://www.briandunning.com/cf/751
September 26, 201213 yr It's not only possible, but the function listed above by "comment" depends upon a function called "CustomList" that does exactly what you want. http://www.briandunning.com/cf/868 Basically, you give it a start and stop value (in your example those would be 1 and 5, respectively) and a string that should be evaluated as a calculation, with [n] holding the place of the "current count." It results in a return-delimited string with the values calculated. So, for your scenario, you would use: CustomList ( 1 ; 5 ; "[n] * 2" ) That would result in: 2 4 6 8 10
September 26, 201213 yr the function listed above by "comment" depends upon a function called "CustomList" I don't think so.
September 27, 201213 yr Author guys.. thank for the help.. I think I'm really close but i can use a bit more.. I now have a calculation that go's like this: CustomList ( 1 ; Table::CategoryCount ; "ExtractLine ( Table::CategoryList ; [n]) & " = " & ConditionalSummary ( Expenses::Category ; ExtractLine ( Table::CategoryList ; [n]) ; Expenses::Total)") it's should give me a list of total spent per category but it gives only 1 wierd nummer All the separate parts work but in the total something go's wrong... CustomList ( 1 ; Table::CategoryCount ; "ExtractLine ( Table::CategoryList ; [n])") works fine and gives me a list of categories ConditionalSummary ( Expenses::Category ; ExtractLine ( Table::CategoryList ; "2" ) ; Expenses::Total) gives me total spent of category item 2 so what's going wrong with the combination? Thx again :worship:
September 27, 201213 yr it's should give me a list of total spent per category Are you sure there isn't a simple way to produce such list - for example, a report summarized by category?
September 27, 201213 yr Author Uhee well... I was trying it this way because of a view things: - I want to sell this DB to different customers. - The Categories are in a editable value list ( so every customer can make his own list) - This data should be on a dashboard as running totals - and i can not create a new relationship and a new table occurrence for every category because i don't know what they are going to be In this way i can make a list of unique categories used and find the total spent on them and use it in all the relationships i already have. I hope this makes sense..... Thank again
September 27, 201213 yr It's not necessary (or smart) to have a relationship for every category. You should have a table of Categories and let each category summarize the related expenses using a single relationship to the Expenses table.
September 27, 201213 yr Author I understand what u mean but I did not want a new table only for the categories. And I think it's more eazy for the user to edit a value list than a table. But I'll have a other look at it. In the meantime. How knows what's wrong with the formula above? Any help would be super cool
Create an account or sign in to comment