Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I want to create a chart that shows the count and sum of one field but limits the output to criteria from another field. What is the correct syntax for the expression (eg: where field1 = X). Thanks in advance
Are tables containing your fields associated?
You should use set analysis. Something like this:
=sum({<field1={'X'}>}field2)
The fields are all derived from a single table in the load script that has no link to the other data.
It would help if you could give a more specific example of what you are trying to do. Are you saying that the result of an expression in one fields provides a value that you want to use as a filter on another field within another expression?
I have two dimensions on the chart Sum of field1 and Count of field1. I want to use an expression to filter the result based on a value in field2. Boyh fields are in the same table. Just to note, I am new to Qlikview.
I'm afraid this doesn't make sense to me. Surely if Field 2 is a dimension in the table then it is already 'filtering' the expression fields?
=sum({<field2={'X'}>}field1)
and
=count({<field2={'X'}>}field1)
Hi Michael, You can't use Sum or Count aggregation functions in the dimensions.
Please post sample data and explain clearly what you are looking.
I want to thank you all for the responses. I will try to state the issue more clearly. I want to create a straight table chart that sums as well as counts the data in one field using crieria from another field to filter the result.
Field1 Field2
10 1
15 2
20 1
I want the sum and count of Field1 for those records that are equal to 1 in Field2. I tried =sum({<field2={'X'}>}field1) as sugested above but got unfiltered results. Again thank you.