Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Dynamic label expression as column name in line chart

Hi

I have a line chart which is sales values from 2005 to 2025.

2005 to 2016 is actual data

2016 to 2025 is forecast data

using if(year<=2016,'<S1>','<S3>') able to differentiate actual vs Forecast,

i have one more requirement like expression label also

if(year<=2016,'Actual','forecast')  whichi given in expression lable but it is not workling


Can any body do the needful for dynamic label in line chart.

Thanks

Thiru

6 Replies
awhitfield
Partner - Champion
Partner - Champion

Hi Thiru,

can you upload an example QVW please?

Andy

sunny_talwar

Is this something you are trying to do for a legend?

Not applicable
Author

Hi Sunny,

Yes

when we keep our cursor on the chart,the label and the value will be appear right.

My case it is showing sales actual for entire line,but i want to show Actual and Forecast based on year

Thiru

sunny_talwar

May be using 2 expressions instead of 1?

Capture.PNG

Not applicable
Author

Hi Sunny

Thanks,Ok.

I will use this as of now.If any solution is available please let me know

Thiru

Anil_Babu_Samineni

As i understand, You should need to write Condition from General Tab

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful