Forum Discussion

ShivaPrasad's avatar
ShivaPrasad
New Contributor
3 months ago

How to apply conditional formatting in Cell(Cell is having text)

Hi Team,

Can any one help on this.

I have text in the cells, so based on my text have to apply the conditional formatting.

if my cell has "YES" text then should be Green color, if my cell has "NO" text then should be in RED color. 

Can any one please help us to get the result.

  • MG's avatar
    MG
    Community Manager

    I don't think the standard conditional formatting in the Cube View screen will achieve what you are after since I don't think the CellAmount option will recognise the text values. It might be a good candidate to raise on IdeaStream. 

    If you are displaying the report as a printable report then you may be able to achieve it using a Cube View Extender Rule or Inline Formula. Alternatively if you open the Cube View in Excel, excel formatting may be an option.  

  • Hi MG,

    Thank you for the response, if possible, Can you please provide an example CV Extender rule to make a formatting.  It will help us to get the result

    • pranav46's avatar
      pranav46
      Contributor II

      I used combo box which has literal parameters.

      1 = YES

      2= NO 

      then use below formatting 

      If (CellAmount = 1) Then
      BackgroundColor = Pink, TextColor = Red
      'Else
      ' BackgroundColor = White, TextColor = Black
      End If

      Hope this help but get in idea stream

  • Hi Pranav,

    Thank you for the response.

    I think we can not pass two values in Literal parameter. like below i have created a parameter. but it is not working. Can you please explain me in brief. it will help us a lot.

    Thank you,

    Shiva Prasad.

     

    • pranav46's avatar
      pranav46
      Contributor II

      Do Delimited list
      Display value would be YES, NO
      Value Items 1,0

      In cube view use combo box and bring this parameter and add cell format with condition what I provided.

  • Hi Pranav,

    I have tried this approach earlier, Created a Delimited parameter and Cell type as Combo box. given the parameter at Combo Box. and applied the formatting. but this scenario is not working. what i observed is when we are changing the cell type to Combo box. then it is not a cell to populate the amount. that's why below condition is not working.

    If (CellAmount = 1) Then
    BackgroundColor = Pink, TextColor = Red
    'Else
    ' BackgroundColor = White, TextColor = Black
    End If

    • pranav46's avatar
      pranav46
      Contributor II

      What view member are you using.
      Use periodic or YTD and use one of the dummy UD to store 1 or 0. Only annoying would be it will display No data in combo box and other value.

  • pranav46's avatar
    pranav46
    Contributor II

    What view member are you using.
    Use periodic or YTD and use one of the dummy UD to store 1 or 0. Only annoying would be it will display No data in combo box and other value.