It is currently April 18th, 2024, 4:23 am

Calc formula max length?

Get help with creating, editing & fixing problems with skins
User avatar
limpet
Posts: 34
Joined: April 21st, 2009, 5:25 pm
Location: NC, USA

Calc formula max length?

Post by limpet »

Hey everyone,
What's the maximum length for the formula of a calc measure? I think I went past that. I'm having to do a switch statement of 15 measures resulting in a formula 683 characters long.

Sure would be nice if you could write something like

Code: Select all

MeasureX = (measurea || measureb || measurec) ? %1 : "False statement"
where %1 would be the value that matches MeasureX.

Anyway, yeah, anyone have suggestions for a way to break down my formula?
Limpet makes music: [Soundcloud][Reverbnation][Myspace (ick)][Uvumi][Electronic/Dance]
User avatar
JamesAC
Developer
Posts: 318
Joined: July 14th, 2009, 5:57 pm

Re: Calc formula max length?

Post by JamesAC »

There is a maximum of 9 of these nested conditional statements.

Kenz0 posted a good solution here.
+++ Divide By Cucumber Error. Please Reinstall Universe And Reboot +++
Quis custodiet ipsos custodes?
User avatar
limpet
Posts: 34
Joined: April 21st, 2009, 5:25 pm
Location: NC, USA

Re: Calc formula max length?

Post by limpet »

Yeah, I was starting to figure out the same conclusions.

I ended up breaking up my calc into 3 parts using a similar method in that post. It's a pain because I'm using it for my new calendar and so I have to do those 3 calculations for each of the 42 days that are showing for the current month.

I think it would be possible to slim it down to 2 calculations but I'll get to that after the skin is fully working and ready for optimizations.

Thanks for the help.
Limpet makes music: [Soundcloud][Reverbnation][Myspace (ick)][Uvumi][Electronic/Dance]