![Tableau教程_數(shù)據(jù)聯(lián)接(Join)與數(shù)據(jù)融合(DataBlending)2-2_第1頁](http://file3.renrendoc.com/fileroot_temp3/2022-2/17/ac4db1ed-4a90-4c08-8d73-3b89939a97d5/ac4db1ed-4a90-4c08-8d73-3b89939a97d51.gif)
![Tableau教程_數(shù)據(jù)聯(lián)接(Join)與數(shù)據(jù)融合(DataBlending)2-2_第2頁](http://file3.renrendoc.com/fileroot_temp3/2022-2/17/ac4db1ed-4a90-4c08-8d73-3b89939a97d5/ac4db1ed-4a90-4c08-8d73-3b89939a97d52.gif)
![Tableau教程_數(shù)據(jù)聯(lián)接(Join)與數(shù)據(jù)融合(DataBlending)2-2_第3頁](http://file3.renrendoc.com/fileroot_temp3/2022-2/17/ac4db1ed-4a90-4c08-8d73-3b89939a97d5/ac4db1ed-4a90-4c08-8d73-3b89939a97d53.gif)
![Tableau教程_數(shù)據(jù)聯(lián)接(Join)與數(shù)據(jù)融合(DataBlending)2-2_第4頁](http://file3.renrendoc.com/fileroot_temp3/2022-2/17/ac4db1ed-4a90-4c08-8d73-3b89939a97d5/ac4db1ed-4a90-4c08-8d73-3b89939a97d54.gif)
![Tableau教程_數(shù)據(jù)聯(lián)接(Join)與數(shù)據(jù)融合(DataBlending)2-2_第5頁](http://file3.renrendoc.com/fileroot_temp3/2022-2/17/ac4db1ed-4a90-4c08-8d73-3b89939a97d5/ac4db1ed-4a90-4c08-8d73-3b89939a97d55.gif)
版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進行舉報或認領(lǐng)
文檔簡介
1、關(guān)注:該帖子內(nèi)容基于 Tableau 9.0繼續(xù)對數(shù)據(jù)融合進行剖析,您需要對前一個關(guān)于內(nèi)連接,左連接的帖子熟悉,同時也請您耐心的把這個帖子看完,一定受益匪淺表關(guān)聯(lián)是基于行級別的,但是數(shù)據(jù)融合(數(shù)據(jù)源關(guān)聯(lián))是基于分組級別的,到底區(qū)別在哪里,來兩個例子師范一下(示例數(shù)據(jù)很傻,能說明問題就好)Table 1ArealDAreaName1EAST2WEST3SOUTH4NORTHTable 2ArealDYearSales120141220141320141420141120151220151320151420151AreaLDAreaNameAreaEDYearSales1EAST5 1201412
2、XVEET弋 2201413SOUTHv320141+NORTHJV 420141 120151、22015 1*320151、斗20151數(shù)據(jù)融合,必須有主數(shù)據(jù)表和輔數(shù)據(jù)表,輔表會依據(jù)關(guān)聯(lián)維度聚合, 不可能比數(shù)據(jù)源關(guān)聯(lián)關(guān)系中的粒度更細AreaJD,VeaXaineAreaLDSales1EASTJ122JWEST 223SOUTH-X324NOTH- 42我們將通過下面的示例繼續(xù)剖析數(shù)據(jù)融合,分別在兩張數(shù)據(jù)庫中寫入Superstor 中的Order表,兩張表一模一樣(兩個EXCEL亦可):1、分別連接兩個數(shù)據(jù)庫的中的 Orders表,然后重命名數(shù)據(jù)源為 ds1, ds2,ds1為主數(shù)據(jù)源,d
3、s2位輔助數(shù)據(jù)源,編輯數(shù)據(jù)源關(guān)系,duct category = ductcategory2、分別雙擊 ds1中的Product Category, Sales,繼續(xù)雙擊 ds2中的Sales,可以看到數(shù) 據(jù)一切正常帶有藍色對勾的數(shù)據(jù)源表示主數(shù)據(jù)源,橙色表示輔助數(shù)據(jù)源輔助數(shù)據(jù)源中,有橙色鏈條符號的是指關(guān)聯(lián)字段功能區(qū)中有橙色對勾數(shù)據(jù)源標志的表示該字段來源于輔助數(shù)據(jù)源腳本解析(大概描述后臺運行的邏輯,不是原腳本):I £>dlsl空 ek2 二* City# Custcmer IDAbt Cu-stcmer NameAbe Custcmcr Segmen
4、t皂 Order Date# Order IDAbe Ordp Priority© Postal CodeAbe Product 匚atrgtifyAt: Product Cortainer駄;Product NameAtx Product Sub'CategoryAb: Regicn# Row©民 Ship DateA&c Ship ModeC State or ProvinceAtx箕宣占疝AbcQW"i列宴麻:奮鹽行Product CategoryProduct c»e,rmetFumiturt3,178.5243178624omc
5、eSuopliH2,256,3262 25B 326Technoiagy3.514.癥35149B2度呈直Stt(Sales)總計Sale寸fa宣"3、我們將ds1中的Product sub-category拖至行功能區(qū)Product Category的右側(cè),可以看到ds2中的Sales聚合層級仍舊在Product Category,也就驗證我所說的分組級別的關(guān)聯(lián),但是主數(shù)據(jù)源的數(shù)據(jù)粒度是可以細化的號.Abcssa* I (3SA I大小S5G5. z«a=SchoolH j :ITProduct CategoryProduct Cate. Product Sub-Cate
6、goryFurnitureOfficeSupplierBoot :莎已Chairs & Chair matsOffice FurnishingsTablesAppltancesBinders and Sinderjrresori.EnvelopesLabelsPapt£ An SuppJsRubber BatBSci&arfs. Rulers and Trimmerborage & OrganizsticuiComputer PeripheralsCopiers and FaxOffice MachiresTelephones and Commiinica6.
7、Product Sub-CategorySal«aScales507.494176.6241,1&4,584/廠 3,173,624屮 623,173.6243,178.624jXse.7232.25B.32C638,5522.25B.3261+7.9212.256.32623,4502,253 3262S3,6O02.2Sa,326103.2S2開.炷8,6642.256.32640,4292750,32655,7052.?53,32490, S413.514,9826&1.2123,514,9821.21 8,6573,514.9821.1442733,514,9
8、82I:面 select ds1.Product Category,ds1.Product Sub-Category,ds1.Sales,ds2.Salesfrom(select Product Category, Product Sub-Category, SUM(Sales) as Sales from Ordersgroup by Product Category, Product Sub-Category) ds1 left join(select Product Category, SUM(Sales) as Sales from Ordersgroup by Product Cat
9、egory) ds2on ds1.Product Category = ds2.Product Category4、將 ds2 中Product sub-category 拖至行功能區(qū)中 ds1 Product sub-category 的右側(cè),看 到該字段全部變?yōu)樾翘枺撔Ч刃в赥ableau的attr()函數(shù)腳本解析(大概描述后臺運行的邏輯,不是原腳本):select ds1.Product Category,ds1.Product Sub-Category,ds2.Product Sub-Category,ds1.Sales,ds2.Salesfrom(select Product Category, Product Sub-Category, SUM(Sales) as Sales from Orders group by Product Category, Product Sub-Category) ds1 left join(select Product Category,case whe n min (Product Sub-Category)=max(ProductSub-Category) themin(Product Sub-Category) els
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 暑期教師培訓(xùn)學(xué)習(xí)計劃
- 2025年度家庭裝修石材加工及安裝服務(wù)合同范本
- 專業(yè)性合同范本
- 辦公裝飾合同范本
- 買賣攤位合同范本
- 2025年度生態(tài)農(nóng)業(yè)項目土地流轉(zhuǎn)合作合同
- 公司家具購買合同范本
- 會議營銷分成合同范本
- 關(guān)于解除兼職合同范本
- 法律盡職調(diào)查報告模板
- 胸腔積液護理查房-范本模板
- 水土保持方案中沉沙池的布設(shè)技術(shù)
- 安全生產(chǎn)技術(shù)規(guī)范 第25部分:城鎮(zhèn)天然氣經(jīng)營企業(yè)DB50-T 867.25-2021
- 現(xiàn)代企業(yè)管理 (全套完整課件)
- 走進本土項目化設(shè)計-讀《PBL項目化學(xué)習(xí)設(shè)計》有感
- 《網(wǎng)店運營與管理》整本書電子教案全套教學(xué)教案
- 教師信息技術(shù)能力提升培訓(xùn)課件希沃的課件
- 高端公寓住宅項目營銷策劃方案(項目定位 發(fā)展建議)
- 執(zhí)業(yè)獸醫(yī)師聘用協(xié)議(合同)書
- 第1本書出體旅程journeys out of the body精教版2003版
- 2022年肝動脈化療栓塞術(shù)(TACE)
評論
0/150
提交評論