Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
below straight table show different values for the total by expression to total by sum of rows,
69+644=713 but shows as 711.
I thought it was blanks or duplicate records thats coming in but i have already looking for a distinct count.
This issue solves by using aggr by targeted filed but i would like to know if i am missing something in order to get the correct count?
Thanks.
and your expression looks like?
Count (distinct Code) is the expression
I would interprete the result this way:
Some Code values are related to Targeted value 'Y' as well as to value 'N'.
@swuehl is correct on the reasoning for the values not adding up.
What the aggr is doing is working out the total that are Y and then the total that is N, and then putting them together. This means that the two that are in both are accounted for in both.
You can get the same result by changing the Total method (on the Expressions tab), from Expression Total, to Sum Of Rows. This will always total the values underneath, rather than calculating again. More often than not the Expression Total is the most useful figure though.
If each value should only be one or the other Targeted value you may want to check back to your source data.
To find the dupes, create a table with the Code as a dimension and the following expression:
=if(Count(DISTINCT Targeted) > 1, 1, 0)
Hope that helps,
Steve
I gave it a try to check for the dupes with the way Steve has mentioned but it doesn't help to figure the dupes?
Does this mean there is no dupes?
If there are dupes whats the best of finding it in QlikView?
Your screenshot shows the Num() function, so I guess you are not only doing a Count(DISTINCT) here. Could you please attach a sample QVW file so that your data, dimension and expression can be seen in its full context?
It looks like you have no Codes that are off both types, but you may have
Null values associated with both types. It seems odd that Count would pick
those up though.
Suggest adding a code list box, selecting all values and see what your
result is.
If it is null Codes you can remove them with set analysis:
Count ({<Code={"*"}>} Distinct Code)
Hoe that helps.
Steve
Hi,
In straight table try like this
Properties -> Expression -> Select Expression -> Select Total Mode as Sum (of Rows)
This will show the total by summing up the value in each row.
Hope this helps you.
Regards,
Jagan.
Hi,
Can you provide the data from which these values are coming