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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Linking two fields

I have the following bar chart:

Screen Shot 2016-03-14 at 01.55.20.png

I need to augment the above chart with data from another table with information as provided in the straight table below:

Screen Shot 2016-03-14 at 02.00.11.png

The 'DMF Subject' field in the bar chart is the equivalent of the 'Active Ingredient' in the straight table above, for example the 'Pregabalin' circled in the two charts above.  However, in some cases, these two field values do not match exactly in spelling.  I need to be able to add a second expression to the bar chart which gives the '2015 Revenues' for the  'DMF Subject' based on the corresponding 'Active Ingredient' '2015 Revenue' from the straight table.

How can this be accomplished?

Regards

Chris

1 Solution

Accepted Solutions
Digvijay_Singh

Check if attached can help. I kept same name for subject/Ingredient.I may be wrong from my little understanding of the subject.

View solution in original post

8 Replies
amayuresh
Creator III
Creator III

Please provide Sample Data

Digvijay_Singh

Try something like this, you may need two different scale to plot two measures..

Sum({<Year={2015},[DMF Subject]={"=[DMF Subject]=[Active Ingredient]">}Revenue)

Anonymous
Not applicable
Author

Many thanks.  My expression as per your recommendation is as follows:

Screen Shot 2016-03-14 at 10.08.19.png

However the chart gives the same values for the revenue plot as follows:

Screen Shot 2016-03-14 at 10.08.51.png

The revenues shown are the totals for all the products in the data set.

Regards

Anonymous
Not applicable
Author

Dear Mauresh

Please find attached sample data.  The Annual Reports Summary provides the revenue figures and the second file gives the DMF data.  For the DMF data, use the 'Type' II records only.

Regards.

Digvijay_Singh

How are you linking both the data, is it possible to keep common name  for both these fields? Currently the case is different for both the fields so they won't match. They need to be transformed to same case for comparison, lower() or Upper() function.

AFAIK if both fields have same name in data model, when you take dimension as DMF Subject then automatically it will pick revenue record from same Active ingredient.

Digvijay_Singh

Check if attached can help. I kept same name for subject/Ingredient.I may be wrong from my little understanding of the subject.

Digvijay_Singh

Oh..missed the attachment, here it is -

Anonymous
Not applicable
Author

Many thanks, that works