Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I have a table chart with data and want to set the background color alternating, even rows should get some light color and odd rows should get some darker color. I tried with
If(Even(RowNo()), ...)
But RowNo()
looks for the underlying table. In my case, data might get filtered and then the background color is not alternating properly.
Any hint how to get this done?
Best,
Martin
PS: I want to do it by formula as the data itself is color-coded, so the final formula might be something like
If( [field1] = 1, If( Even(RowNo()), vLightRed, vDarkRed), If( Even(RowNo()), vLightBlue, vDarkBlue ) )
Hi
Try this may be help full for you,
Please find the attached file
goto Expression tab-->click on '+' symbal,--->click on background colour
then check that expression.
Regards,
Mahesh.
HI Martin
I know you said you wanted to do it by formula but If you go to the style tab in your table properties (use the current style drop down box) there are multiple pre-set styles you can play around with and they will not be affected by filters as you stated previously.
Kindest Regards
Brian
This was exactly my approach, but when it comes to filtering the data, it goes wrong. When I choose something from the "hasXY" feature, it is like this:
And for "1":
Any ideas why that approach does not work? The file is attached.
Best,
Martin
Hello:
I've updated the qlikview979 previous sample to add color expresion in variables.
Hope it helps
Joaquín
Hi,
You can use Custom format cell to change the background/text color.
Hello Martin:
We're using the ROW function, after each selection the row number would change, then the background color changes too.
I suggest you two alternative ways:
1) In chart properties, style tab, current style select Pyjama Blue
2) In the script load of the table add a ColorRow field using If(Even(RecNo()), ...)
then the background color expresion should be the ColorRow field
Hope this helps you
Joaquín