Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
New to this product, having a play about with it to evaluate if it would be use able for our company.
Have 2 questions I'm hope someone can help me with please:
1. Can you, and if so, how can you link 'list boxes' to one another? For example, I imported column 'post_id' from table A, but want to link it to the field 'a_post_id' from table B. So if for example I select a single value from list box in table B which is on a sheet of its own,, it will reflect that on the list box 'post_id' which is on sheet A. - Hope that one makes sense!
2. SQL in tables. Once created a table, what is the best way to put you conditions in? Doesn't seem sa straight forward straight forward as popping in a where clause in a box. For example, I have a table, that consists of 4 columns, A.post_id, B.post_id, SUM(a.value), SUM(b.value) - Starts somewhere simple, how, or perhaps I should ask where do I use a "where a.value <> b.value"
Thanks in advance!
Rob
1. You link fields by naming them the same in the data model. So rename the field in table B as you load it in to post_id. There is then just one list box. Now, technically you could have both field names and list boxes, and you could make selections in one make the equivalent selections in the other through the use of actions that you configure. But that's more complicated, and it's not "The QlikView Way".
2. You can use SQL in script if you're loading from an SQL data source. Once loaded from the source, QlikView has similar controls like "where" if you're trying to filter what goes into the data model itself. If you're only trying to apply the condition to a specific chart, it can go in an expression in the chart telling it to only calculate for rows with that condition. For example, sum(if(a.value <> b.value, a.value)). Exact syntax will depend on your data model, and could be more complicated than that. There are also other ways to handle it.
Thank you, very much appreciated.
The issue I have with loading it into QW as the same field name will sadly contradict the reasoning for having them separate, A.post_id will contain masses of posts that are not going to be in b.a_post_id, I only want the user to be able to select from b.a_post_id which will then reflect in post_id. While I don't want the user to be able to select from A.post_id, the data in there is needed however for calculations so has to exist. However, your If statement in your second answer can be applied here, if nothing is selected in a.post_id and what I need selected in b.a_post_id sum(if(post_id = a_post_id, value))
Was kind of hoping SQL syntax would apply here after the load, can you recommend any good tutorials to learn the QW syntax please?
Cheers
Rob