- 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.
- Design for the Future
- Java實用組件集
- 大數據平臺異常檢測分析系統的若干關鍵技術研究
- AWS Certified SysOps Administrator:Associate Guide
- Grome Terrain Modeling with Ogre3D,UDK,and Unity3D
- 基于企業網站的顧客感知服務質量評價理論模型與實證研究
- Dreamweaver CS6中文版多功能教材
- 統計挖掘與機器學習:大數據預測建模和分析技術(原書第3版)
- 簡明學中文版Photoshop
- Mastering Predictive Analytics with scikit:learn and TensorFlow
- 樂高創意機器人教程(中級 上冊 10~16歲) (青少年iCAN+創新創意實踐指導叢書)
- ARM嵌入式系統開發完全入門與主流實踐
- 玩轉機器人:基于Proteus的電路原理仿真(移動視頻版)
- Internet of Things for Architects
- 新手學Photoshop CS6數碼照片處理