Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Everyone,
I need help on the Background color logic. In QlikSense table, I have one dimension column with 4 to 5 concatenate fields. like ID &'-'& Name &'-'& Address &'-'& ContactNo &'-'& Month
213-AAA-XYZ-56739-Apr |
563-BBB-YNB-78654-May |
745-CCC-YGD-45976-Jun |
356-DDD-YGD-29747- |
198-EEE-XYZ-46954- |
Color Logic:
If the Month value is Previous month means always it should be in Yellow. if the month is not Previous month then we need to show it as Light green. suppose they select any values on the table that cell should be highlighted as Darker green but yellow should be maintain the same color and the Unselected values should be light green.
Note: I'm using Alternate state (GWA Requirement) in my table based on requirement.
My Background color condition
if(MonthFlag='PreviousMonth','#ffbc3d',
if(GetFieldSelections(ID,',',100,'GWA Requirement' )=ID and MonthFlag='PreviousMonth','#ffbc3d',
if(GetFieldSelections(ID,',',100,'GWA Requirement' )=ID and MonthFlag<>'PreviousMonth','#57C880',
if(GetFieldSelections(ID,',',100,'GWA Requirement' )<>ID and MonthFlag<>'PreviousMonth','#c1e6ce',
'#ffbc3d'))))
It's partially work for me. all the conditions work. except when they select "Not Previous month" ID value , the "Previous Month" ID color changed as lighter green. It's wrong.
EX: Without any selection
213-AAA-XYZ-56739-Apr |
563-BBB-YNB-78654-May |
745-CCC-YGD-45976-Jun |
356-DDD-YGD-29747- |
198-EEE-XYZ-46954- |
Select the "Not Previous Month" value - Jun (here yellow should maintain the same)
213-AAA-XYZ-56739-Apr |
563-BBB-YNB-78654-May |
745-CCC-YGD-45976-Jun |
356-DDD-YGD-29747- |
198-EEE-XYZ-46954- |
Select the "Previous Month" value - Apr
213-AAA-XYZ-56739-Apr |
563-BBB-YNB-78654-May |
745-CCC-YGD-45976-Jun |
356-DDD-YGD-29747- |
198-EEE-XYZ-46954- |
Kindly help on this. to write a correct expression
Thanks for your help😊
Finally, I found the Solution.
if((count({<ID=,Name =,Address =,ContactNo =, Month=,MonthFlag={'PreviousMonth'}>}ID))>0,'#ffbc3d',
if(GetFieldSelections(ID,',',100,'GWA Requirement' )=ID and
MonthFlag<>'PreviousMonth','#57C880',
if(not GetFieldSelections(ID',',100,'GWA Requirement' )=ID and
not MonthFlag='PreviousMonth'','#c1e6ce')))
Thanks for the help.
Try this and pls chk the braces
if(MonthFlag='PreviousMonth',
if(GetSelectedCount({<MonthFlag={'PreviousMonth'}>} ID)>0, '#ffbc3d', '#ffbc3d'),
if(GetSelectedCount({<MonthFlag={'PreviousMonth'}>} ID)>0, '#57C880',
if(GetSelectedCount({<MonthFlag={'PreviousMonth'}>} ID)=0, '#c1e6ce', '#ffbc3d')
)
)
Thanks for your valuable reply.
It's not working, Even I closed the brackets but I'm getting the error message.
If I remove this part from getselectedcount, the error message is gone.
{<MonthFlag={'PreviousMonth'}>}
Finally, I found the Solution.
if((count({<ID=,Name =,Address =,ContactNo =, Month=,MonthFlag={'PreviousMonth'}>}ID))>0,'#ffbc3d',
if(GetFieldSelections(ID,',',100,'GWA Requirement' )=ID and
MonthFlag<>'PreviousMonth','#57C880',
if(not GetFieldSelections(ID',',100,'GWA Requirement' )=ID and
not MonthFlag='PreviousMonth'','#c1e6ce')))
Thanks for the help.