I have a straight table in Qlikview with the below values:
Col1 Col2 Col3
Value1 ABC Datetimestamp
Value1 XYZ Datetimestamp
Value1 ABC Datetimestamp
Value 1 XYZ Datetimestamp
The thing is Col2 dimension is having toggling values like ABC,XYZ and varies as per the timestamp in col3 which can also be millisecond difference and datetimestamp is not constant and keeps changing in time/second/millisecond.
I want to change the background color of Col2 cell only and i used the backgroud color expression in the Col2 dimension
and even tried the below:
both the times it ended changing the entire column color to one color.
But I just want to change the cell background color of Col2 alternatively based on current , previous values.
Could you pls help.
Your expression Just need Aggr function
Assuming Col2,Col1,Col3 are your dimensions . Note that you need to include all the dimension in aggr to work.
Thanks for your reply. I tried with adding aggr outside and mentioned all my diemsion columns i used in the straight table but again it changed the color of the entire column Col2.
I was looking to change only the col2 cell background alternatively based on toggle values. Say if I have 4 values in the column Col2, then i want to change the background color of those 4 values alternatively from RED , GREEN .
I am still not sure how to achieve it.
You will need to have data with the same value in column 2 for it to work. Your example does not.
load * inline [id, col1, col2, col3
(note lines id3 and id4 are the same)
Create the straight table using all dimensions and the expression for background color will be just as you tried;
This had all rows red except for id4 because ABC = ABC. it was green.
Thanks for coming back to me. I have attached a sample file here and it is exactly the data I get from the system which I am showing in straight table, since the Col2 flip flops for the same col1 value over different times, the requirement is to show the col2 background color to highlight in alternate colors. Attached is just a sample data and I have thousands of lines coming from the source which can be like the sample data.
the requirement is to show the all the values in C2 with background color switching alternatively as the value flip flops.
I tried with background color formula for C2 Dimension as
--it changes again whole column color for 4 row cells to single color instead of changing alternatively
Col2 values always filp flop and that is the requirement to show for such values only.