Alternate column different background color

Vigneshwar
New Contributor

Is there a way to display alternate columns in different colors even if we apply expansion (e.g.   .tree , .children etc.)

3 REPLIES 3

HoneyGulati
New Contributor II

Do you mean rows or columns?

We can achieve it through conditional formatting in Cube views

 

It is for Columns 

Can you give some sample codes to achieve alternate colors to the column when we use expansion

The conditional formatting can be done based on various factors such as indent level  , member description , header display text etc

For Ex: I used 2024.base in my columns which will populate all the months of 2024 and then used header display text to add colors to alternate months

Formatting

If (ColE2HeaderDisplayText Contains 'Apr') OR (ColE2HeaderDisplayText Contains 'Jun') OR (ColE2HeaderDisplayText Contains 'Aug') OR (ColE2HeaderDisplayText Contains 'Oct') OR (ColE2HeaderDisplayText Contains 'Dec') OR (ColE2HeaderDisplayText Contains 'Feb') Then

BackgroundColor = Linen
Else

BackgroundColor = SkyBlue
End if

HoneyGulati_0-1685530507200.png