Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

Announcements
BARC’s The BI Survey 19 makes it official. BI users love Qlik. GET REPORT
ahmar811
Contributor 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
Contributor III

Re: Background colour using expression

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

Re: Background colour using expression

ahmar811
Contributor III

Re: Background colour using expression

hi

Robert Mika

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

MVP & Luminary
MVP & Luminary

Re: Background colour using expression

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
Contributor III

Re: Background colour using expression

Hi,

Are you able to upload a sample?

Rgds,

Dinu1

ahmar811
Contributor III

Re: Background colour using expression

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