Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Replace labels in a line chart

Hi,

I am using a line chart created with data imported from a table (table_1) in MySQL. To render the graph as I want it I use a cross table statement.

It works nicely.

The remaining thing to improve now are the labels. The MySQL data base has the proper labels stored in another table (table_2), hence in the graph when it takes the labels from the attribute used as the dimension I get a number, whereas in table_2 the prober label is a text-string.

Is there a way for me to replace the labels in the line chart to get proper labels for the attributes?

5 Replies
jagan
Luminary Alumni
Luminary Alumni

Hi,

Join/Load the two tables and use the dimension which is having proper labels.

Regards,

Jagan.

Clever_Anjos
Employee
Employee

I think this app do what you want

Not applicable
Author

Hi Carl,

What you can do is first left join Table_2 onto table one (if you want you can even use applymap with the label field loaded from table_2 and apply this to Table_1).

After joining / using applymap use the crosstable statement.

When the document has reloaded you can now use the labels instead of the numbers in your graph.

Hope this helps.

BR,

JM

Not applicable
Author

Hi,

Thanks for the reply! I have now read up some around Join. The tow tables do not really have a common index key, So I would most likely have to create a key at the same time.

Any idea / pointer for how I could do that?  I am not a seasoned coder, so any extra info you can put in is great!

Not applicable
Author

Hey Carl,

it is likely that the key has a different name in both tables. For a database to use a certain label stored in another table and link it correctly it will have to look for at least 1 common field (this can also be a combination of fields).

In the QlikView load script you can rename fields to automatically link tables to each other.

A worse scenario for you that I can imagine, is that there is indeed not a common key. That might seem strange at first glance, but the tables could be linked together by a third table that has a key in common with table 1 and another key in common with table 2, connecting the two together.

Hope this helps!

BR,

JM