Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
mallikarjunautr
Contributor II
Contributor II

Shading bars in Combochart

mallikarjunautr_0-1727234388412.png

As shown in the above chart, i have few bars in the graph. I need to shade the past 3 months with lines. can anyone help me how to do it, 

Labels (1)
6 Replies
MatheusC
Specialist II
Specialist II

Hi, @mallikarjunautr 
Try it in your bar expression:

if(FieldMonthName>= max(total FieldMonthName,3),'color1','color2')

*remember to change the example fields to your real fields*


- Matheus

Did you find a solution to your question? Mark the solution as accepted and if you found it useful, press the like button!
mallikarjunautr
Contributor II
Contributor II
Author

Hi @MatheusC , thanks for your response

I tried this logic but I'm loosing Legends due to expression in color,  I want to keep same color for all the months but need to differentiate with lines are any other shades

MatheusC
Specialist II
Specialist II

This is not possible natively.

Maybe you can look for an extension that gives you this, if it's really necessary.

- Matheus

Did you find a solution to your question? Mark the solution as accepted and if you found it useful, press the like button!
mallikarjunautr
Contributor II
Contributor II
Author

Hi @MatheusC , thank you. any idea which extension will provide this feature. we are using Vizlib

Kushal_Chawda

@mallikarjunautr  As mentioned earlier it is not possible natively, instead you can colour those bars with different colour.

You can use the color by expression as below

Screenshot 2024-09-27 at 10.51.53.png

 

Use below expression. Make sure that your MonthYear Field is Numeric format

if( floor(MonthYear) >= monthstart(addmonths(Today(),-3)) and
floor(MonthYear) < monthstart(Today()), red(),green())

You can change the colour accordingly

mallikarjunautr
Contributor II
Contributor II
Author

Hi @Kushal_Chawda , thanks for your reply, by applying this expression I'm loosing legend, I want to keep legend.