Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I have this table, and I want to show the data in a table and based on the Type, I want to set a Text color expression
LOAD * INLINE [Id, Type,ModelName, ActivationTime, Value
1, 0, 'Alpha', 2019-01-01 12:35:22.400, 0
2, 0, 'Alpha', 2019-01-01 12:35:22.600, 0
3, 0, 'Beta', 2019-01-01 12:35:22.600, 0
4, 0, 'Beta', 2019-01-01 12:35:22.600, 1
5, 1, 'Alpha', 2019-01-01 12:35:22.400, 0
6, 2, 'Beta', 2019-01-01 12:35:22.400, 0
7, 1, 'Alpha', 2019-01-01 12:35:22.500, 0
8, 2, 'Alpha', 2019-01-01 12:35:22.600, 0
9, 1, 'Alpha', 2019-01-01 12:35:22.700, 0
10, 2, 'Alpha', 2019-01-01 12:35:22.700, 1
];
If Type=2, I want to compare the column value with the previous row and if there are not equal then I want to set a different color. I am using this condition for the columns ModelName, ActivationTime, Value
=IF(Type=1, RGB(0,0,255), IF(Type=2, IF(ModelName<>Above(ModelName,1), RGB(255,0,0))))
=IF(Type=1, RGB(0,0,255), IF(Type=2, IF(ActivationTime<>Above(ActivationTime,1), RGB(255,0,0))))
=IF(Type=1, RGB(0,0,255), IF(Type=2, IF(Value<>Above(Value,1), RGB(255,0,0))))
The problem is, that even if the values are equal, I get the red color for each column,row with Type 2
What am I doing wrong?
Unfortunately it didn't work.
The solution is to use the verb total
IF(xxx<>Above(Total(xxx),1)
Hi,
Use only one dimension and add all other as Expression and it will work.
Regards,
Kaushik Solanki
Thank you for the fast reaction.
I am new in Qlik Sense.
What do you mean exactly with 'Use only one dimension and add all other as Expression'
BR
athinadev
Hi,
What I mean by that is when you add table, just add one dimension (i.e ID in your case).
Rest all should be added as expression.
Regards,
Kaushik Solanki
Unfortunately it didn't work.
The solution is to use the verb total
IF(xxx<>Above(Total(xxx),1)