Skip to main content
Newcomer
Feb 25, 2024 3:31 PM UTC
Solved

Cube View Cell Conditional Formatting - Large % result

I am trying to create a conditional formatting code to convert a large percentage result in a percent variance column to replace it with text ("nm").  Can anyone provide the conditional formatting text that would replace the actual % variance with text?

db_pdxAnswer
Contributor
Feb 26, 2024 7:18 PM UTC

This is our |!Percentage_Cell!| parameter:

Scale=0, ExcelUseScale = True,
If (CellAmount >= 10) Then
ExcelNumberFormat = ["NA";"NA";"NA"], NumberFormat = ["NA";"NA";"NA"]
Else If (CellAmount <= -10) Then
ExcelNumberFormat = ["NA";"NA";"NA"], NumberFormat = ["NA";"NA";"NA"]
Else
NumberFormat = [#,###,0.0%], ExcelNumberFormat = [#,###,0.0%]
End If

For anything greater than +/-1000% (10), we replace the value with 'NA'. Apply to your row/column cell format as applicable. 

2 replies

db_pdxAnswer
Contributor
Feb 26, 2024 7:18 PM UTC

This is our |!Percentage_Cell!| parameter:

Scale=0, ExcelUseScale = True,
If (CellAmount >= 10) Then
ExcelNumberFormat = ["NA";"NA";"NA"], NumberFormat = ["NA";"NA";"NA"]
Else If (CellAmount <= -10) Then
ExcelNumberFormat = ["NA";"NA";"NA"], NumberFormat = ["NA";"NA";"NA"]
Else
NumberFormat = [#,###,0.0%], ExcelNumberFormat = [#,###,0.0%]
End If

For anything greater than +/-1000% (10), we replace the value with 'NA'. Apply to your row/column cell format as applicable. 

kglenAuthor
Newcomer
Feb 26, 2024 7:40 PM UTC

Thank you so much!  That worked perfectly.