Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
sersal10
Creator
Creator

Merging 2 tables and keep alignment

Hi all

I have 2 tables in a dashboard, and want to merge them. In the first table I have a music festival name and the sales of this year. in the second one, the same, but they are from the last year. The festivals have an event_code and a previous_event_code. So I choose a festival from this year by its name in a filter, and then I sum(quantity) and have the sales for this year. In the second table I do the same, put the event_name in the first column, but the meassure is:

Sum({<event_code=p(previous_event_code), event_name= >}quantity)

If I try to put the event_name and bothe meassures in the same table, the names of the previous year are added , the table is longer and the values are not in line horizontaly for comparison. Is there a way to solve this? 

Labels (5)
4 Replies
WaltShpuntoff
Employee
Employee

If the other dimensions in your chart are the same in both source tables, then you can have two columns in your chart. One will use Sum({<event_code={previous_event_code}>}quantity) and the second column will be Sum({<event_code={current_event_code}>}quantity).

-ws

sersal10
Creator
Creator
Author

Hi WS, 


I think this is what I did and what I said at the end of the post is what happens.

marcus_sommer

I think it could be quite simple - if there exists only a single table with the fields: Name, Code, Date, Quantity. Then Name + the linked Year of the Date could be used as dimensions and sum(Quantity) as expressions.

WaltShpuntoff
Employee
Employee

Make sure that you do not have any fields in your table that are unique to the individual records. Those will force the extra row.

This means your table will have only

  • Common fields that are the same for both records as dimensions
  • Use the set analysis for the measures. One expression for each column.

ws