Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 4450 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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

Posted

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?

Posted

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

Posted

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

Posted

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:

Posted

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?

Posted

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

Posted

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.

Posted

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

This topic is 4450 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.