Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I have created a qlikview doc. where in one doc I linked the tables removing the syn keys and in the other doc I just loaded the same data and did not remove the syn keys.
I am getting a major difference in the =Count(UnitPrice) [The Text Object].. When i check the UnitPrice field in both the docs, i see that the data without the syn keys has less data than the other.
The above image is the data after removed the syn keys....
This data is just a raw data loaded with the syn keys..
My question is whether or not the data is correct.
Thanks.
When I look at the two data model screenshots:
the first data model (on top without syn. keys) has only one field UnitPrice in one table (FactTable). So count(UnitPrice) will only count the values in this particular field in this particular table.
In the second model (with syn keys) you count UnitPrice values in table OrderDetails and Products...so you probably count a lot more values than you intended and get a wrong result.
Hello Siddhesh,
I have just used some test data and checked dont know I have found no difference actually when counted on one of the fields. I might be wrong, Just wondering if you could send an image from Table Viewer that shows syn keys at your end.
Hi vishsaggi,
Here are the two models that i have generated.
I think the question is which of your data tables contain the number of UnitPrice that you actually want to count.
For example: if UnitPrice was in two tables they should have caused a syn. key (if there were other keys as well) which you probably removed by renaming the fields like tab1: UnitPrice and tab2: UnitPrice_other.
If you have a messy data model with syn. keys and count (Field) then Qlik will count all possible values/rows - no matter if they are from the 'right' table to look at.
Hi Daniel,
Could you please explain it more. I'm sorry, I'm a complete newbie at this so i couldn't understand it clearly.
I am also attaching the qv files if it could help.
Thanks.
When I look at the two data model screenshots:
the first data model (on top without syn. keys) has only one field UnitPrice in one table (FactTable). So count(UnitPrice) will only count the values in this particular field in this particular table.
In the second model (with syn keys) you count UnitPrice values in table OrderDetails and Products...so you probably count a lot more values than you intended and get a wrong result.
Thank you Sir,
Helped me a lot. Thanks again.
Your are welcome