- Hands-On Business Intelligence with Qlik Sense
- Pablo Labbe Clever Anjos Kaushik Solanki Jerry DiMaso
- 332字
- 2021-07-02 13:05:33
Pitfalls of using joins
Joins are simple to understand and use, but there is one hidden pitfall that can create lots of issues in your output data. Until now, we have seen simple data that had a one-to-one relationship between the values of the joining field, but in some scenarios, you may encounter multiple relationships between data. In such a case, your output data may get duplicated and the overall result may turn out wrong.
Let's understand this using the same example we used in the preceding sections. The only change will be that we add the last record in the Customer table:

You can see in the preceding table that we added a new record, which makes a duplicate entry for the primary key; that is, CustomerID, with a value of 3.
When we use this table along with any join condition, it will create two records in the resulting table, because the record 3 has a duplicate value. Let's assume that we use left join the Customer table to the Order table. The resulting output would look like the following screenshot:

You can see in the preceding screenshot that order number 102 has appeared twice, one with the customer name as Sam and the other as Vinay. You can also observe that OrderValue also got duplicated due to this new record. So, when you calculate on OrderValue from this resulting table, you will get the wrong value.
Thus, whenever you use any joins in Qlik Sense, you must make sure that the joining table has distinct records to get the correct values after joining.
- 電力自動(dòng)化實(shí)用技術(shù)問(wèn)答
- Word 2000、Excel 2000、PowerPoint 2000上機(jī)指導(dǎo)與練習(xí)
- Microsoft Power BI Quick Start Guide
- 中文版Photoshop CS5數(shù)碼照片處理完全自學(xué)一本通
- 計(jì)算機(jī)控制技術(shù)
- 數(shù)據(jù)運(yùn)營(yíng)之路:掘金數(shù)據(jù)化時(shí)代
- 分布式多媒體計(jì)算機(jī)系統(tǒng)
- 大型數(shù)據(jù)庫(kù)管理系統(tǒng)技術(shù)、應(yīng)用與實(shí)例分析:SQL Server 2005
- 四向穿梭式自動(dòng)化密集倉(cāng)儲(chǔ)系統(tǒng)的設(shè)計(jì)與控制
- 中國(guó)戰(zhàn)略性新興產(chǎn)業(yè)研究與發(fā)展·智能制造
- 激光選區(qū)熔化3D打印技術(shù)
- 手機(jī)游戲程序開(kāi)發(fā)
- Excel 2007終極技巧金典
- HBase Essentials
- Redash v5 Quick Start Guide