Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hello experts
i am working with qlik sense enterprise 2021 May, I found count(申请人id) worked as count(distinct 申请人id) in my App 674 which three tables join, i am so confused ..... but it works correct in App 674(1) which only two tables join. is this related to three tables join or maybe it is a feature or maybe other reason... please help , Detail please check attachment Apps and pictures . thank you
An aggregation on a key field is not well defined, unless you use the distinct clause: If you have several tables, the engine doesn't "know" which table to use when making the count. The different tables will return different values.
Take a look at "Aggregation of key fields" on https://help.qlik.com/en-US/sense/May2022/Subsystems/Hub/Content/Sense_Hub/Scripting/AggregationFunc....
If you don't want a count distinct, you need to make a copy of the key field, and use this for your count.
We did change the behaviour a couple of versions back, because we had bugs in the logic - bugs that made the behaviour inconsistent.
But now it is consistent: If the field is a key between three or more tables, a count will always return the count distinct.
An aggregation on a key field is not well defined, unless you use the distinct clause: If you have several tables, the engine doesn't "know" which table to use when making the count. The different tables will return different values.
Take a look at "Aggregation of key fields" on https://help.qlik.com/en-US/sense/May2022/Subsystems/Hub/Content/Sense_Hub/Scripting/AggregationFunc....
If you don't want a count distinct, you need to make a copy of the key field, and use this for your count.
We did change the behaviour a couple of versions back, because we had bugs in the logic - bugs that made the behaviour inconsistent.
But now it is consistent: If the field is a key between three or more tables, a count will always return the count distinct.
Thank you Henric~