Skip to main content
Question

Breaking up Nested IF Statements

  • March 25, 2026
  • 1 reply
  • 19 views

ChrisAHeathcote
Apprentice Author

Hi,

I come from a modelling background in which we are encouraged to find alternatives to nested IF formulas. 

I am also close to finishing the Pro Basic online training in which we are asked to copy a nested IF formula to assign a ‘Request Status’ to changes in ‘to be hired’ items in a workforce planning model. 

The formula contains 4 IF functions in which various criteria is assessed in order to assign status. 

My observation is that would it be more efficient to create individual metrics for each status, build a formula to assign an outcome to a single item subset of the ‘Status Request’ dimension and then consolidate each individual metric into a final metric containing the full list. Then lookup this source metric in the target metric. 

This no doubt involves more steps but feels like it would intuitively be more efficient in spite of the additional blocks. 

Would love to hear thoughts from others. 

 

 

1 reply

CDALMAY
Master Helper
Forum|alt.badge.img+16
  • Master Helper
  • March 26, 2026

Hi ​@ChrisAHeathcote,

I agree having too many IF nested isn’t ideal and harder to read. To avoid nesting IF, I sometimes use the SWITCH function if the situation allows it.

Another option is what ​@Stef described here :

However, in your case it won’t work as the data type target is a dimension and not a number.

Creating individual metrics could help for readability but I think you will still need to nest IFBLANK. For instance after created the 5 individual metrics with their own IF, you can simplify it like this.

IFBLANK(TBH_Calc_Is_Approved,
IFBLANK(TBH_Calc_Is_Rejected,
IFBLANK(TBH_Calc_Is_Pending,
IFBLANK(TBH_Calc_Is_Submitted,TBH_Calc_Not_Started))))

Hope this helps,