I love the concept of the Prettify Formula, but I don’t love the logic it uses. Having spent a bit of my earlier career in software development, I realized a few things that made my code more readable.
When doing if logic, I want the comma separating the logic test and true result placed on a new ling and indented to just past the opening “(“. I do this so I can easily trace where logic changes happen.. and it is a little easier to comment things out or copy/paste into the formula playground for testing.
if(Month.’Period Type’ = ‘Period Type’.”Actual”
, Data.Amount[by: Data.Month, Data.Entity]
, previous(Month) * 1.01)
For simple formulas, I typically won’t break a line. For formulas where there is a long set of modifiers, I will line break the modifiers and indent them 2 or three spaces past where the previous modifier starts. I don’t need to break each modifier; just enough to fill up a line, as I don’t want to have too many lines, which makes troubleshooting challenging if I have a long formula and need to see a lot of grid results on the screen.if(Month.’Period Type’ = ‘Period Type’.”Actual”
, Data.Amount[by: Data.Month, Data.Entity, Data.Department]
[filter: Entity.”US”][‘set_GL Actuals’]
, previous(Month) * 1.01)
I also consider that the blocks are they key part of my formula; the color coding is great, so I don’t believe you need to capitalize formula names.
IF(Month.’Period Type’ = ‘Period Type’.”Actual”
, Data.Amount[BY: Data.Month, Data.Entity]
, PREVIOUS(Month) * 1.01)
In the example above, my eye is drawn to the formula names versus the block names.
Finally, I would argue a slightly different color of the properties of a block could be a way to help reduce confusion for new Pigmenters. In the example below, I changed the properties to Cyan as a way to slightly differentiate.IF(Month.’Period Type’ = ‘Period Type’.”Actual”
, Data.Amount[BY: Data.Month, Data.Entity]
, PREVIOUS(Month) * 1.01)
I’m curious if others have similar thoughts about formatting.

