Formula for new column to get a hierarchy view in report

Morning,

I am working on code to get some type of hyerarchy view in a report

I added the below code and it is just coming up as blank


I spread the code out a bit so you could see what I was trying to do, where did i go wrong?

=IF(CONTAINS(0, [Task Level]@row), [Task Name]@row,

IF(CONTAINS(1, [Task Level]@row), "--" + [Task Name]@row,

IF(CONTAINS(2, [Task Level]@row), "----" + [Task Name]@row,

IF(CONTAINS(3, [Task Level]@row), "------" + [Task Name]@row,

IF(CONTAINS(4, [Task Level]@row), "--------" + [Task Name]@row,

IF(CONTAINS(5, [Task Level]@row), "--------" + [Task Name]@row,

IF(CONTAINS(6, [Task Level]@row), "----------" + [Task Name]@row))))))))

Best Answer

Answers

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!