Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Change chart axis label, keeping values for calculation

Hi all !

I have this set of data describing the Advancement of Projects and their associated current Phase.

Project | Advancement | Phase

Prj_1    |   2                 | Ph_1

Prj_2    |   7                 | Ph_3

Prj_3    |   5                 | Ph_2

Based on these records, I've built a chart displaying my Projects and their Advancement in number (see attached screenshot).

Question : Instead of display Advancement values on X-axis (see Attached Screenshot), I would like to display Associated Phase labels. Bars length still depends on Advancement values.

Any ideas ?

Regards,

Julien

7 Replies
Not applicable
Author

Check if this works for you. Some hardcode work needs to be done through

Regards,

Kiran

Not applicable
Author

Hi Kiran,

Thanks for your answer but I need something dynamic. It works fine with this set of data but if values change, chart will be wrong.

Regards,

Julien

Not applicable
Author

so  you want the Phase labels to be dynamic?

You can add 1 table in your datamodel which contains for each Advancement the phase and phase description it belongs to. Drop these things from your projects-Advancement table.

Also, you can use the description field in your "label" in your expression

Not applicable
Author

Hi,

Please see if the attached can help you.

Cheers.

Not applicable
Author

BlackRockS, your idea is interesting, thanks. I will work on it.

Martijn, I'm sorry, I don't understand your answer. How QV will associate Advancement labels on axis with bar length ? It takes number values to determine bar length. And if you give it number values, it will write them on the axis, not labels.

I've found something interesting in QV functions : dual() function, which associates a string representation with a given number representation. In this way, i've built a mapping table which associates Phase Label and Advancement. In my Project table, Dual() function associates these Phases label to their advancement in a single field "Phase" :

Advancement:

Mapping LOAD

          Phase_Label,

  Phase_Advancement

FROM Phase.qvd(qvd);

Project:

LOAD

      Dual (Phase_Label, ApplyMap('Advancement, Phase_Label)) as Phase,

     ...

FROM Project.qvd(qvd);

I use this new field in the expression of my bar chart and this is what happens (see attached screenshot). QV uses number representation to calculate bar length and label value to describe bars. I still don't manage to display these labels on x-axis but i'm getting close to the solution.

Not applicable
Author

Hi,

Please post your qvw….

SunilChauhan
Champion II
Champion II

may be linke this

Sunil Chauhan