Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
ahmar811
Creator III
Creator III

Background colour using expression

Hi All

I have pivot table with three dimension (Model, Month-Year, Product).I have a requirement to change the background colour using expression like

if(Model='PERSONAL CATEOGRY', OR  Model='COMMERCIAL CATEGORY' OR Model='NOT MAINTAINED' OR Model='Total',RGB(163,245,268))

It works fine,but when I arrange my dimension in horizontal direction the above expression doesn't work.

Capture.JPG

Please refer above screenshot.

Kindly suggest some solution

Thanks & Regards

Ahmar Ansari

1 Solution

Accepted Solutions
ahmar811
Creator III
Creator III
Author

Thank you all

I got my solution by using macro which is

sub HideColumn

    Call HideSubFunction("CH04",2)

end sub

private sub HideSubFunction(ch,n)

    set ch=ActiveDocument.GetSheetObject(ch)

    ch.SetPixWidh (n-1),0

end sub

Thanks & Regards

Ahmar Ansari

View solution in original post

5 Replies
robert_mika
Master III
Master III

ahmar811
Creator III
Creator III
Author

hi

Robert Mika

Thanks for your response but it not work....

marcus_sommer

I think there would be rather no way to access these header-column which is a kind of a help-column only to show the horizontal dimension. As a workaround you could use a second (dummy) expression maybe = '' and adjust the column-width to as small as possible (with a macro it could be nearly unvisible).

sub SetColumnWidth

set chart = ActiveDocument.GetSheetObject("CH17")

chart.SetPixWidth 3, 0

end sub

- Marcus

dinuwanbr
Creator III
Creator III

Hi,

Are you able to upload a sample?

Rgds,

Dinu1

ahmar811
Creator III
Creator III
Author

Thank you all

I got my solution by using macro which is

sub HideColumn

    Call HideSubFunction("CH04",2)

end sub

private sub HideSubFunction(ch,n)

    set ch=ActiveDocument.GetSheetObject(ch)

    ch.SetPixWidh (n-1),0

end sub

Thanks & Regards

Ahmar Ansari