Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
Paknanarn23
Creator II
Creator II

I want to add color to a bar graph.

I want to add color to the bar graph by entering the Expression background color.

Paknanarn23_0-1701424469345.png

The conditions are If the bar graph shows data for the year, include rgb(30,144,255) and if the graph shows data for the month, enter Rgb(70,130,180) and if the graph shows data for the day, enter rgb(135,206,250)


This is the code that displays the data in a bar graph.

Paknanarn23_1-1701424849514.png

please help me

 

1 Reply
Ahidhar
Creator III
Creator III

go to properties>expressions>expand>background color>Definition

if(KCE_MonthYear>=Date(Addmonths(today(0)-1,-1),'YYYY-MM-01'), RGB(135,206,250),

if(KCE_Year>Year(Today(0)-1)-1, RGB(70,130,180),

if(KCE_Year>Year(Today(0)-1)-3,RGB(30,144,255))))