Skip to main content
Announcements
Accelerate Your Success: Fuel your data and AI journey with the right services, delivered by our experts. Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Vince_CH
Creator III
Creator III

Change of dimension label of bar/line chart

Dear All,

I made some line chart as below, with 2019 in fiscal year YTD in the dimension.  I want to make the 2019 looked like '2019 YTD' instead, like red font indicated, and still can be ranked in '2016, 2017,2018, 2019YTD'.  Is there anybody having this experience or advices?? thanks!

11.jpg

Labels (1)
1 Solution

Accepted Solutions
zzyjordan
Creator II
Creator II

Hi, Vince

In your qvf file, I just copy the expression and it works, please refer below screenshot.

and I also attached the modified qvf as well.

Let me know if it is still a problem.

ZZ

qlik.JPG

View solution in original post

20 Replies
zzyjordan
Creator II
Creator II

Hi, Huichunchang

Please see my solution belowUntitled.jpg

 

Hope this helps

ZZ

Vince_CH
Creator III
Creator III
Author

@zzyjordan:

thanks for your time, I have tried as per your advices, but the result still kept same as below.

 

11.jpg

Vince_CH
Creator III
Creator III
Author

by the way, the fiscalyear is not an original field, instead was an scripted definition in the editor.
Kalmer
Partner - Creator
Partner - Creator

Strange, I used it on a random app i have and the example you gave above is working fine for me.

Set e_current_year = "= MAX(calendar.year)";
=if(calendar.year >= 2014, if(calendar.year = e_current_year, calendar.year & ' YTD', calendar.year));

Result on image:
YTD.png

Vince_CH
Creator III
Creator III
Author

Dear all, I put like following expressions , it works, but not with vMaxFiscalYear_Entry,
=If(FiscalYear_Entry>='2014',If(FiscalYear_Entry='2019',FiscalYear_Entry&' YTD',FiscalYear_Entry))

Hereby the FiscalYear_Entry was the defition of scripts like below in the editor:
If(Month([Sales Machine No. Creating Date])='Jan'or Month([Sales Machine No. Creating Date])='Feb'or Month([Sales Machine No. Creating Date])='Mar'or Month([Sales Machine No. Creating Date])='Apr'or Month([Sales Machine No. Creating Date])='May'or Month([Sales Machine No. Creating Date])='Jun',Year([Sales Machine No. Creating Date]),(Year([Sales Machine No. Creating Date])+1))as FiscalYear_Entry,

I had thought the failure was due to multiple optional dimension existed, but it was not, since I deleted the rest, it kept same. Also there were some data existed without time, but I already excluded the null in the dimension, so this should not impact?

Kalmer
Partner - Creator
Partner - Creator

If you have unticked the "show null values" then they will not be shown / counted since that dimension "null" is not available to be measured.
Also i would change the FiscalYear logic in the script, there is a nice post here:
https://community.qlik.com/t5/Qlik-Design-Blog/Fiscal-Year/ba-p/1472103 (one of the first posts made in the community + still should work) or
https://community.qlik.com/t5/New-to-QlikView/Different-fiscal-year-from-calender-year/td-p/300654
Vince_CH
Creator III
Creator III
Author

Dear Kalmer, I just tried with ticking "show null values", it is still same.
thanks for the sharing for fiscal year calendar, which more simple, I will explore it ...

Kalmer
Partner - Creator
Partner - Creator

if your chart has null() values within the dimension added to the chart it will allow you to deselect Include null values.
Doing that will remove the "-" dimension with its measurements.
chart.png

Vince_CH
Creator III
Creator III
Author

Yes, understood that, having tried with the tick and without tick in both options, but the results kept same.