<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>數據分析 彙整 &#8211; Sharon Lab∣雪倫實驗室</title>
	<atom:link href="https://aderlab.com/data-analytics/feed/" rel="self" type="application/rss+xml" />
	<link></link>
	<description>數據分析師的工作日常與職場點滴</description>
	<lastBuildDate>Mon, 20 Jan 2025 14:18:22 +0000</lastBuildDate>
	<language>zh-TW</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	

<image>
	<url>https://i0.wp.com/aderlab.com/wp-content/uploads/cropped-sharons-lab-logo-1.png?fit=32%2C32&#038;ssl=1</url>
	<title>數據分析 彙整 &#8211; Sharon Lab∣雪倫實驗室</title>
	<link></link>
	<width>32</width>
	<height>32</height>
</image> 
<site xmlns="com-wordpress:feed-additions:1">164707546</site>	<item>
		<title>數據分析師必看！Tableau 自學指南：技能解析、應用實例與學習心得分享</title>
		<link>https://aderlab.com/data-analytics/tableau-self-learning/</link>
					<comments>https://aderlab.com/data-analytics/tableau-self-learning/#respond</comments>
		
		<dc:creator><![CDATA[Sharon]]></dc:creator>
		<pubDate>Sun, 12 Jan 2025 08:27:31 +0000</pubDate>
				<category><![CDATA[Tableau]]></category>
		<category><![CDATA[數據分析]]></category>
		<guid isPermaLink="false">https://aderlab.com/?p=5454</guid>

					<description><![CDATA[<p>「想成為數據分析師需要哪些技能？」這是許多剛接觸數據分析領域的新手常有的疑問。這篇文章，除了解答新手常見的疑難雜症外，我也會分享我在初學 Tableau 時面臨的挑戰與調整。</p>
<p>這篇文章 <a href="https://aderlab.com/data-analytics/tableau-self-learning/">數據分析師必看！Tableau 自學指南：技能解析、應用實例與學習心得分享</a> 最早出現於 <a href="https://aderlab.com">Sharon Lab∣雪倫實驗室</a>。</p>
]]></description>
										<content:encoded><![CDATA[
<p class="">「想成為數據分析師需要哪些技能？」這是許多剛接觸數據分析領域的新手常有的疑問。從基礎技能來看，SQL 和資料視覺化工具是最常被要求的兩項技能。SQL 是用來查詢和管理資料庫的核心語言，而資料視覺化則能幫助數據分析師將複雜數據轉化為圖表和故事，不僅提升溝通效率，還能更有效地說服利害關係人，常見的資料視覺化工具包括 Salesforce 的 Tableau 和 Microsoft 的 Power BI，其中 Tableau 的技能需求最為普遍。 </p>



<p class="">這篇文章，我想分享成為數據分析師後，我每天都會用到的重要技能：Tableau。這篇文章將介紹：Tableau 是什麼？為什麼這麼多企業重視 Tableau 技能？為什麼 Excel 或 Python 雖然能製圖，卻不一定是最佳選擇？在網路上找Tableau 教學影片學習學得起來嗎？除了解答新手常見的疑難雜症外，我也會分享我在初學 Tableau 時面臨的挑戰、調整，以及我的 Tableau 啟蒙課程：<a href="https://tinyurl.com/25pcszjy"><strong>資料變決策！從零上手 Tableau 大數據視覺化</strong></a>。</p>



<h2 class="wp-block-heading"><strong>Tableau 是什麼？為什麼數據視覺化選擇 Tableau？</strong> </h2>



<p class="">Tableau 是什麼？如果你是第一次接觸數據分析領域可能會有這個疑問，Tableau 簡單來說就是一種視覺化分析平台，而實際工作場域中，Tableau 的作用不僅僅只是提供給數據分析師做分析與報告，還包括了提供決策者自動化更新的數據報表、提供內部或外部單位做重點資訊掌握或查詢，例如：透過建置 Tableau 報表，可以預設寄件時間，定期將發送報表，讓老闆快速掌握盈虧，進一步採取行動，像是調整庫存、改變銷售策略等；而在平行同事合作方面，則可以提供同事更多的數據幫助採取行動，例如提供會員消費狀況、行銷預算花費與個別行銷管道的收益，判斷行銷策略與會員溝通策略是否奏效。&nbsp;</p>



<p class="">善用數據的力量，不僅能幫助我們評估當前決策的優劣，結合資料視覺化後，更能讓同事一眼掌握重點，迅速辨識數據中的問題並採取行動。舉例來說，同樣是銷售數據，第一張圖是一張完整的數據表格，而第二張圖則經過基本的資料視覺化處理，比較之下，第一張圖密密麻麻的數據讓人難以抓住重點；但第二張圖，經過欄位篩選後與簡單視覺化後，不僅清晰顯示出「紅色」的衰退品項類型，還指出需要特別留意的部分。我們可以基於這些初步的警示（Alert），進一步挖掘需要改善的行動方案。&nbsp;</p>



<figure data-wp-context="{&quot;imageId&quot;:&quot;6987a5dd33630&quot;}" data-wp-interactive="core/image" data-wp-key="6987a5dd33630" class="wp-block-image wp-lightbox-container"><img decoding="async" data-wp-class--hide="state.isContentHidden" data-wp-class--show="state.isContentVisible" data-wp-init="callbacks.setButtonStyles" data-wp-on--click="actions.showLightbox" data-wp-on--load="callbacks.setButtonStyles" data-wp-on-window--resize="callbacks.setButtonStyles" src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXc8oGHb0rT0Dq0Rqi-Zh1rHYjFaFeWIFhzaa7Otz_BgXO7m1veCopNOjKy-kGYrGPU_eplgO7eMpU6224exPP7_s6KKCLkgrAvWcKp_gMF7TxXlVFuJDjPXGUDHFZ5j4sl8BCnl?key=mSOWS9YytkdtMkpS22SyHta5" alt="數據視覺化前的原始資料 "/><button
			class="lightbox-trigger"
			type="button"
			aria-haspopup="dialog"
			aria-label="Enlarge"
			data-wp-init="callbacks.initTriggerButton"
			data-wp-on--click="actions.showLightbox"
			data-wp-style--right="state.imageButtonRight"
			data-wp-style--top="state.imageButtonTop"
		>
			<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" fill="none" viewBox="0 0 12 12">
				<path fill="#fff" d="M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z" />
			</svg>
		</button><figcaption class="wp-element-caption">數據視覺化前的原始資料&nbsp;</figcaption></figure>



<figure data-wp-context="{&quot;imageId&quot;:&quot;6987a5dd338a9&quot;}" data-wp-interactive="core/image" data-wp-key="6987a5dd338a9" class="wp-block-image size-large wp-lightbox-container"><img data-recalc-dims="1" fetchpriority="high" decoding="async" width="708" height="417" data-wp-class--hide="state.isContentHidden" data-wp-class--show="state.isContentVisible" data-wp-init="callbacks.setButtonStyles" data-wp-on--click="actions.showLightbox" data-wp-on--load="callbacks.setButtonStyles" data-wp-on-window--resize="callbacks.setButtonStyles" src="https://i0.wp.com/aderlab.com/wp-content/uploads/%E9%80%8F%E9%81%8E%E6%95%B8%E6%93%9A%E8%A6%96%E8%A6%BA%E5%8C%96%E5%BE%8C%E5%B8%B6%E4%BE%86%E7%9A%84%E9%87%8D%E9%BB%9E%E6%8F%90%E7%A4%BA%E6%95%88%E6%9E%9C.png?resize=708%2C417&#038;ssl=1" alt="透過數據視覺化後帶來的重點提示效果 " class="wp-image-5456" srcset="https://i0.wp.com/aderlab.com/wp-content/uploads/%E9%80%8F%E9%81%8E%E6%95%B8%E6%93%9A%E8%A6%96%E8%A6%BA%E5%8C%96%E5%BE%8C%E5%B8%B6%E4%BE%86%E7%9A%84%E9%87%8D%E9%BB%9E%E6%8F%90%E7%A4%BA%E6%95%88%E6%9E%9C.png?resize=1024%2C603&amp;ssl=1 1024w, https://i0.wp.com/aderlab.com/wp-content/uploads/%E9%80%8F%E9%81%8E%E6%95%B8%E6%93%9A%E8%A6%96%E8%A6%BA%E5%8C%96%E5%BE%8C%E5%B8%B6%E4%BE%86%E7%9A%84%E9%87%8D%E9%BB%9E%E6%8F%90%E7%A4%BA%E6%95%88%E6%9E%9C.png?resize=300%2C177&amp;ssl=1 300w, https://i0.wp.com/aderlab.com/wp-content/uploads/%E9%80%8F%E9%81%8E%E6%95%B8%E6%93%9A%E8%A6%96%E8%A6%BA%E5%8C%96%E5%BE%8C%E5%B8%B6%E4%BE%86%E7%9A%84%E9%87%8D%E9%BB%9E%E6%8F%90%E7%A4%BA%E6%95%88%E6%9E%9C.png?resize=768%2C452&amp;ssl=1 768w, https://i0.wp.com/aderlab.com/wp-content/uploads/%E9%80%8F%E9%81%8E%E6%95%B8%E6%93%9A%E8%A6%96%E8%A6%BA%E5%8C%96%E5%BE%8C%E5%B8%B6%E4%BE%86%E7%9A%84%E9%87%8D%E9%BB%9E%E6%8F%90%E7%A4%BA%E6%95%88%E6%9E%9C.png?resize=1536%2C904&amp;ssl=1 1536w, https://i0.wp.com/aderlab.com/wp-content/uploads/%E9%80%8F%E9%81%8E%E6%95%B8%E6%93%9A%E8%A6%96%E8%A6%BA%E5%8C%96%E5%BE%8C%E5%B8%B6%E4%BE%86%E7%9A%84%E9%87%8D%E9%BB%9E%E6%8F%90%E7%A4%BA%E6%95%88%E6%9E%9C.png?resize=2048%2C1206&amp;ssl=1 2048w, https://i0.wp.com/aderlab.com/wp-content/uploads/%E9%80%8F%E9%81%8E%E6%95%B8%E6%93%9A%E8%A6%96%E8%A6%BA%E5%8C%96%E5%BE%8C%E5%B8%B6%E4%BE%86%E7%9A%84%E9%87%8D%E9%BB%9E%E6%8F%90%E7%A4%BA%E6%95%88%E6%9E%9C.png?w=1416&amp;ssl=1 1416w, https://i0.wp.com/aderlab.com/wp-content/uploads/%E9%80%8F%E9%81%8E%E6%95%B8%E6%93%9A%E8%A6%96%E8%A6%BA%E5%8C%96%E5%BE%8C%E5%B8%B6%E4%BE%86%E7%9A%84%E9%87%8D%E9%BB%9E%E6%8F%90%E7%A4%BA%E6%95%88%E6%9E%9C.png?w=2124&amp;ssl=1 2124w" sizes="(max-width: 708px) 100vw, 708px" /><button
			class="lightbox-trigger"
			type="button"
			aria-haspopup="dialog"
			aria-label="Enlarge"
			data-wp-init="callbacks.initTriggerButton"
			data-wp-on--click="actions.showLightbox"
			data-wp-style--right="state.imageButtonRight"
			data-wp-style--top="state.imageButtonTop"
		>
			<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" fill="none" viewBox="0 0 12 12">
				<path fill="#fff" d="M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z" />
			</svg>
		</button><figcaption class="wp-element-caption">透過數據視覺化後帶來的重點提示效果</figcaption></figure>



<p class="">說到這裡，你可能會有疑問，能夠做出圖表的工具那麼多，為什麼這麼多企業會要求使用 Tableau 呢？如果 Excel 或是 Python 就可以做出圖表難道不行嗎？我會說其實也可以，但實務工作上不適合。&nbsp;</p>



<p class="">首先是 Excel。雖然 Excel 也可以製圖沒錯，但它最大的缺點是無法處理龐大的資料量，以我自己工作的分析情境來說，資料的筆數都是十幾萬、甚至是幾百萬筆的資料量（可以簡單想像成 Excel 的列數，以資料大小換算大概都是幾 GB 起跳的資料），在這種情況下 Excel 無法支援，即便可以使用，其處理速度非常緩慢。此外，而第二個原因就是：Excel 沒辦法做到全自動化的資料更新與圖表更新，做圖之後如果需要更換資料來源、資料範圍都會是很大的維護問題。&nbsp;</p>



<p class="">接著來說說為什麼 Python 比較少被我拿來使用在資料視覺化的分析情境下呢？因為操作的複雜性比較高，以折線圖來比較，在圖片上的任何顯示都需要寫一段程式碼，例如圖例、折線圖每個折點上要不要出現點點、每個點要不要顯示數值，所有的顯示我都得用「一串程式碼」來完成，但是 Tableau 只需要拖拉而已，而圖表的所有視覺設定，也只要到對應的設定上按按滑鼠左鍵就完成了，幾乎是一兩秒鐘就可以完成的事，想像一下，假設我今天需要做100個圖表分析，一行程式碼我打30秒，彼此差距就差了46分鐘的操作時間落差。數據分析的重點在於「解讀數據」並「挖掘洞察」，所以，善用 Tableau 工具提升數據視覺化的效率就是最佳的分析工具選擇。</p>



<figure data-wp-context="{&quot;imageId&quot;:&quot;6987a5dd33b11&quot;}" data-wp-interactive="core/image" data-wp-key="6987a5dd33b11" class="wp-block-image size-large wp-lightbox-container"><img data-recalc-dims="1" decoding="async" width="708" height="398" data-wp-class--hide="state.isContentHidden" data-wp-class--show="state.isContentVisible" data-wp-init="callbacks.setButtonStyles" data-wp-on--click="actions.showLightbox" data-wp-on--load="callbacks.setButtonStyles" data-wp-on-window--resize="callbacks.setButtonStyles" src="https://i0.wp.com/aderlab.com/wp-content/uploads/image-12.png?resize=708%2C398&#038;ssl=1" alt="Tableau 拖拉介面，讓數據分析更便捷" class="wp-image-5457" srcset="https://i0.wp.com/aderlab.com/wp-content/uploads/image-12.png?resize=1024%2C576&amp;ssl=1 1024w, https://i0.wp.com/aderlab.com/wp-content/uploads/image-12.png?resize=300%2C169&amp;ssl=1 300w, https://i0.wp.com/aderlab.com/wp-content/uploads/image-12.png?resize=768%2C432&amp;ssl=1 768w, https://i0.wp.com/aderlab.com/wp-content/uploads/image-12.png?resize=1536%2C864&amp;ssl=1 1536w, https://i0.wp.com/aderlab.com/wp-content/uploads/image-12.png?w=1801&amp;ssl=1 1801w, https://i0.wp.com/aderlab.com/wp-content/uploads/image-12.png?w=1416&amp;ssl=1 1416w" sizes="(max-width: 708px) 100vw, 708px" /><button
			class="lightbox-trigger"
			type="button"
			aria-haspopup="dialog"
			aria-label="Enlarge"
			data-wp-init="callbacks.initTriggerButton"
			data-wp-on--click="actions.showLightbox"
			data-wp-style--right="state.imageButtonRight"
			data-wp-style--top="state.imageButtonTop"
		>
			<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" fill="none" viewBox="0 0 12 12">
				<path fill="#fff" d="M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z" />
			</svg>
		</button><figcaption class="wp-element-caption">Tableau 拖拉介面，讓數據分析更便捷&nbsp;</figcaption></figure>



<p class="">而關鍵的 Tableau 功能是：互動式儀表板，可以讓身為數據分析師的我們、使用 Tableau 報表的同事們，透過一鍵滑鼠達成客製化的數據查看與分析需求。舉個例子，以下影片中展示的銷售報表，使用者可以快速依據不同需求進行排序，例如按銷售額排序，一眼看到銷售金額最高的商品；或者按毛利排序，這可能是老闆更關心的指標，因為銷售額高並不代表真正賺錢。&nbsp;</p>



<p class="">假如某商品銷售額很高，但其生產成本同樣居高不下，那麼毛利可能並不理想。一增一減之下，銷售額高的商品未必能為公司帶來真正的獲利。相對地，毛利高的商品才更有可能成為公司獲利的主要來源。這種互動式的數據探索功能，不僅能快速滿足多元的使用者需求，還大幅提升了分析效率與數據決策的價值。&nbsp;</p>



<figure class="wp-block-video"><video height="1482" style="aspect-ratio: 1598 / 1482;" width="1598" controls src="https://aderlab.com/wp-content/uploads/Dynamic_ranking-1.mov"></video></figure>



<h2 class="wp-block-heading"><strong>初學資料視覺化，常見的 Tableau 自學難題</strong>&nbsp;</h2>



<p class="">如果你也想要學會 Tableau，以下可能是你很容易遇到的學習問題，也是我從行銷轉職數據分析師時遇到的切身之痛： </p>



<ol class="wp-block-list">
<li class="">不知道要從哪裡開始著手<br>網路上 Tableau 教學的 Youtube 影片其實不少，但是零碎學習的壞處就是沒有辦法系統性的學會這項工具，就會很難在實務上彈性的應用這項工具的強大分析與視覺化功能。 </li>



<li class="">不知道要分析什麼主題<br>首次接觸資料分析，會很容易沒有問題意識，例如不知道什麼問題可以透過數據回答？什麼數據別人會需要？我能用數據帶來什麼價值？這些都是我初入數據分析領域常常會質疑自己的問題，這是正常的現象，就像肌肉未經訓練時無力可用，無從下手也是自然的。 </li>



<li class="">哪裡可以找到分析資料？<br>這也是我剛入門的時候的一大挑戰，哪裡有不需要整理的資料來源？而哪裡可以找到想要分析領域的資料來源？ </li>



<li class="">工具有哪些操作功能<br>例如說維度跟度量資料的差異是什麼？想要做的資料分析不知道適合用什麼圖表，或是想要在 Tableau 做條件計算該怎麼做？篩選器、參數的選單差異又是什麼？ </li>



<li class="">怎麼建立自己的作品集<br>回想我第一次做視覺化作品的時候，只能用「心虛」來形容當時的自己，其一是覺得設計的圖表很醜，沒有很好看，其二是被 Tableau Public 公開的作品集嚇到，因為每個作品集都精美到像是一幅畫一樣，就會覺得自己的作品像是小孩子的扮家家酒一樣，不過，現在想想，在作品集其實只要強調兩件事：一件事是你會使用這個工具，其次則是，你要怎麼用數據來找到洞察、解決問題，把握這兩個原則，基本上就可以了。 </li>
</ol>



<p class="">分享這些初入門的困擾，是想跟還在學習入門數據分析師的你說，有這些學習新工具的困擾都是正常的，等到慢慢熟悉這項工具、多實作之後，這些困擾跟自我質疑就會慢慢淡化，最後消失不見的。 </p>



<h2 class="wp-block-heading"><strong>Tableau 教學資源推薦：用系統化課程快速上手</strong>&nbsp;</h2>



<p class="">而我當時面對這些困擾，一開始是想要透過閱讀官方的資料或是網路上的教學影片自己學會，因為我當時已經有 Microsoft Power BI 的使用經驗，所以我心想，雖然是不同的資料視覺化工具，但應該邏輯跟操作方向應該差不多，所以我就選擇先自己摸一摸 Tableau 的工具介面，然後操作看看，遇到問題再上網找資料或是影片來看，但連續用了這個做法做了好幾週，只能說學習非常讓人灰心喪志，因為即便都是資料視覺化工具，但是操作方式、公式邏輯，甚至是基礎的圖表設定方式，完全不一樣，所以自己摸索與上網查資源，確實是學的比較辛苦。</p>



<p class="">為了加速自己的學習進度與減少挫敗感，我後來決定上線上課程的方式來改善，我當時上的課程是 HaHow 的<a href="https://tinyurl.com/25pcszjy">資料變決策！從零上手 Tableau 大數據視覺化</a>，這門課程算是我的啟蒙課程，能夠解決新手學習 Tableau 遇到的大部分困擾，上完課之後，可以解決我上述提到的新手自學難題，而且最重要的是：立刻就可以做出一個屬於自己的作品來，還有一張完課的結業證書，可以證明你對 Tableau 是有下功夫的。</p>



<p class=""> </p>



<figure data-wp-context="{&quot;imageId&quot;:&quot;6987a5dd33ebe&quot;}" data-wp-interactive="core/image" data-wp-key="6987a5dd33ebe" class="wp-block-image wp-lightbox-container"><img decoding="async" data-wp-class--hide="state.isContentHidden" data-wp-class--show="state.isContentVisible" data-wp-init="callbacks.setButtonStyles" data-wp-on--click="actions.showLightbox" data-wp-on--load="callbacks.setButtonStyles" data-wp-on-window--resize="callbacks.setButtonStyles" src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXfwLd8RD-jyXkKy_ZimdPxSMB2YdjD-paplIqmEwdfuURVaASa52DfanHl1ry1UxFT5b61yCLXTVM3wuWR241_PS7FUC-p5qXCejFaabZYcChY7a2ghqFrU21IhCnF8bVRt8rlv?key=mSOWS9YytkdtMkpS22SyHta5" alt="正在插入影像..."/><button
			class="lightbox-trigger"
			type="button"
			aria-haspopup="dialog"
			aria-label="Enlarge"
			data-wp-init="callbacks.initTriggerButton"
			data-wp-on--click="actions.showLightbox"
			data-wp-style--right="state.imageButtonRight"
			data-wp-style--top="state.imageButtonTop"
		>
			<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" fill="none" viewBox="0 0 12 12">
				<path fill="#fff" d="M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z" />
			</svg>
		</button><figcaption class="wp-element-caption">我於Hahow上課完的結業證書</figcaption></figure>



<p class="">我自己很喜歡課程裡面的數據儀錶版教學： </p>



<p class="">第一個是如何透過折線圖，做出時間軸的預測分析。這個需求在實際工作場域非常好用，例如你已經有今年跟去年的銷售資料，今年已經到9月份，你想要透過前9個月的資料預測接下來第四季的銷售走向，或是用去年同期的成長幅度預測今年第四季的走向，就是非常方便且有用的預測性分析。&nbsp;</p>



<p class="">第二個則是行銷人常常會聽到或用到的 RFM 模型分析，透過消費者的最近消費日期、消費頻率以及消費金額，做客戶分群，進而針對不同類型的客戶做不同的行銷規劃或是溝通主題，在我還是行銷領域的工作時，就曾經利用這個模型來幫助公司建立客戶分析與分群的策略規劃。&nbsp;</p>



<p class="">第三個則是地圖資料，如果你的工作是要用到地圖分析，那麼這堂課剛好有個單元就是在教地圖，而且還有介紹可以和 Tableau 相容使用的外部地圖來源，會讓你除了基本的 Tableau 操作應用外，也會有延伸的補充資源可以收穫。&nbsp;</p>



<p class="">我的 Tableau 入門課程：<a href="https://tinyurl.com/25pcszjy"><strong>資料變決策！從零上手 Tableau 大數據視覺化</strong></a>，如果你還苦於學不會 Tableau，我覺得這是一堂可以輕鬆入門的敲門磚，最後也分享我在完課之後，立刻就可以上手，最終做出來的兩版作品。&nbsp;</p>



<p class="">第一版完課作品，改良課程教授的設計模板，轉換資料之後變成自己的實作作品</p>



<div class='tableauPlaceholder' id='viz1736670269498' style='position: relative'><noscript><a href='#'><img data-recalc-dims="1" alt='銷售利潤分析（城市） ' src="https://i0.wp.com/public.tableau.com/static/images/ZZ/ZZ48BKRFN/1_rss.png?w=708&#038;ssl=1" style='border: none' /></a></noscript><object class='tableauViz'  style='display:none;'><param name='host_url' value='https%3A%2F%2Fpublic.tableau.com%2F' /> <param name='embed_code_version' value='3' /> <param name='path' value='shared&#47;ZZ48BKRFN' /> <param name='toolbar' value='yes' /><param name='static_image' value='https:&#47;&#47;public.tableau.com&#47;static&#47;images&#47;ZZ&#47;ZZ48BKRFN&#47;1.png' /> <param name='animate_transition' value='yes' /><param name='display_static_image' value='yes' /><param name='display_spinner' value='yes' /><param name='display_overlay' value='yes' /><param name='display_count' value='yes' /><param name='language' value='zh-TW' /></object></div>                <script type='text/javascript'>                    var divElement = document.getElementById('viz1736670269498');                    var vizElement = divElement.getElementsByTagName('object')[0];                    if ( divElement.offsetWidth > 800 ) { vizElement.style.width='100%';vizElement.style.height=(divElement.offsetWidth*0.75)+'px';} else if ( divElement.offsetWidth > 500 ) { vizElement.style.width='100%';vizElement.style.height=(divElement.offsetWidth*0.75)+'px';} else { vizElement.style.width='100%';vizElement.style.height='1277px';}                     var scriptElement = document.createElement('script');                    scriptElement.src = 'https://public.tableau.com/javascripts/api/viz_v1.js';                    vizElement.parentNode.insertBefore(scriptElement, vizElement);                </script>



<p class=""></p>



<p class="">第二種作品，以課程分享的 Story 功能，做出如 PPT 簡報的報告式作品</p>



<div class='tableauPlaceholder' id='viz1736670163282' style='position: relative'><noscript><a href='#'><img data-recalc-dims="1" alt='Indian E-commerce Revenue Analysisby Sharon Wei ' src="https://i0.wp.com/public.tableau.com/static/images/E-/E-commerceAnalysis_17360859499660/1/1_rss.png?w=708&#038;ssl=1" style='border: none' /></a></noscript><object class='tableauViz'  style='display:none;'><param name='host_url' value='https%3A%2F%2Fpublic.tableau.com%2F' /> <param name='embed_code_version' value='3' /> <param name='site_root' value='' /><param name='name' value='E-commerceAnalysis_17360859499660&#47;1' /><param name='tabs' value='no' /><param name='toolbar' value='yes' /><param name='static_image' value='https:&#47;&#47;public.tableau.com&#47;static&#47;images&#47;E-&#47;E-commerceAnalysis_17360859499660&#47;1&#47;1.png' /> <param name='animate_transition' value='yes' /><param name='display_static_image' value='yes' /><param name='display_spinner' value='yes' /><param name='display_overlay' value='yes' /><param name='display_count' value='yes' /><param name='language' value='zh-TW' /></object></div>                <script type='text/javascript'>                    var divElement = document.getElementById('viz1736670163282');                    var vizElement = divElement.getElementsByTagName('object')[0];                    vizElement.style.width='700px';vizElement.style.height='747px';                    var scriptElement = document.createElement('script');                    scriptElement.src = 'https://public.tableau.com/javascripts/api/viz_v1.js';                    vizElement.parentNode.insertBefore(scriptElement, vizElement);                </script>



<p class="">不過，如果你是已經是 Tableau 老手，想要學習進階的 Tableau 使用方法，例如說：LOD 計算、參數應用、深入研究 Tableau 的各種公式、資料更新自動化或是 Tableau Server 這端的應用，那麼這堂課就完全不適合了，我自己在上完這堂課之後，這些進階功能的使用則是邊做邊在成為數據分析師之後慢慢累積起來的，具體做法主要為以下兩個：&nbsp;</p>



<ul class="wp-block-list">
<li class="">遇到問題時，優先參考官方的教學資源：Tableau Learning<br>當你有對 Tableau 工具的基礎認識與操作熟悉度之後，閱讀官方提供的教學與說明就會更加容易理解跟上手。 </li>



<li class="">花時間研究其他人的作品集<br>並從中汲取靈感，具體作法與要點是：從 Tableau Public 平台中，下載既包含原始資料又包含完整 Tableau 工作簿的作品（如下圖，需要同時可以「資料」與 「Tableau」這兩個選項都是可以選的，沒有反灰 ），這樣可以觀摩對方的做法，研究對方的分析角度、選擇的圖表，以及是否有互動性功能，並學習如何實現這些功能。研究完後，從空白畫布開始，嘗試模仿對方的視覺化報表，這樣能夠真正掌握技巧，並加深對實務操作的能力。 </li>
</ul>



<figure data-wp-context="{&quot;imageId&quot;:&quot;6987a5dd3427f&quot;}" data-wp-interactive="core/image" data-wp-key="6987a5dd3427f" class="wp-block-image size-large wp-lightbox-container"><img data-recalc-dims="1" decoding="async" width="708" height="546" data-wp-class--hide="state.isContentHidden" data-wp-class--show="state.isContentVisible" data-wp-init="callbacks.setButtonStyles" data-wp-on--click="actions.showLightbox" data-wp-on--load="callbacks.setButtonStyles" data-wp-on-window--resize="callbacks.setButtonStyles" src="https://i0.wp.com/aderlab.com/wp-content/uploads/%E5%8F%AF%E5%AE%8C%E6%95%B4%E4%B8%8B%E8%BC%89-Tableau-%E4%BD%9C%E5%93%81%E7%9A%84%E6%AA%94%E6%A1%88%E7%AF%84%E4%BE%8B.png?resize=708%2C546&#038;ssl=1" alt="可完整下載 Tableau 作品的檔案範例 " class="wp-image-5455" srcset="https://i0.wp.com/aderlab.com/wp-content/uploads/%E5%8F%AF%E5%AE%8C%E6%95%B4%E4%B8%8B%E8%BC%89-Tableau-%E4%BD%9C%E5%93%81%E7%9A%84%E6%AA%94%E6%A1%88%E7%AF%84%E4%BE%8B.png?resize=1024%2C790&amp;ssl=1 1024w, https://i0.wp.com/aderlab.com/wp-content/uploads/%E5%8F%AF%E5%AE%8C%E6%95%B4%E4%B8%8B%E8%BC%89-Tableau-%E4%BD%9C%E5%93%81%E7%9A%84%E6%AA%94%E6%A1%88%E7%AF%84%E4%BE%8B.png?resize=300%2C232&amp;ssl=1 300w, https://i0.wp.com/aderlab.com/wp-content/uploads/%E5%8F%AF%E5%AE%8C%E6%95%B4%E4%B8%8B%E8%BC%89-Tableau-%E4%BD%9C%E5%93%81%E7%9A%84%E6%AA%94%E6%A1%88%E7%AF%84%E4%BE%8B.png?resize=768%2C593&amp;ssl=1 768w, https://i0.wp.com/aderlab.com/wp-content/uploads/%E5%8F%AF%E5%AE%8C%E6%95%B4%E4%B8%8B%E8%BC%89-Tableau-%E4%BD%9C%E5%93%81%E7%9A%84%E6%AA%94%E6%A1%88%E7%AF%84%E4%BE%8B.png?w=1153&amp;ssl=1 1153w" sizes="(max-width: 708px) 100vw, 708px" /><button
			class="lightbox-trigger"
			type="button"
			aria-haspopup="dialog"
			aria-label="Enlarge"
			data-wp-init="callbacks.initTriggerButton"
			data-wp-on--click="actions.showLightbox"
			data-wp-style--right="state.imageButtonRight"
			data-wp-style--top="state.imageButtonTop"
		>
			<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" fill="none" viewBox="0 0 12 12">
				<path fill="#fff" d="M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z" />
			</svg>
		</button></figure>



<p class="">可完整下載 Tableau 作品的檔案範例</p>



<p class="">如果你的需求僅限於 Excel 分析，或者想學習 Google Looker Studio 的操作技巧，也可以參考這門由同位講師設計的課程：<a href="https://tinyurl.com/29exjbcb"><strong>資料變決策！商業圖表製作與視覺化分析的技術</strong></a>。無論是 Excel 的應用還是更進一步的 Tableau 視覺化分析，選擇適合你的學習資源，絕對有助於提升你的數據分析能力以及求職面試的勝率，希望這些課程資源與分享，能幫助你展開你的數據分析旅程。</p>



<p class="">若對這堂課感興趣，歡迎到 Hahow 一起學習！結帳輸入折扣碼「aohahow」，全站課程 9 折起（募資課程除外），使用期限至 2025/12/31！</p>



<p class="">Hahow 官網：<a href="https://tinyurl.com/2ch2bbqt">https://tinyurl.com/2ch2bbqt</a>&nbsp;</p>



<figure data-wp-context="{&quot;imageId&quot;:&quot;6987a5dd34429&quot;}" data-wp-interactive="core/image" data-wp-key="6987a5dd34429" class="wp-block-image wp-lightbox-container"><img decoding="async" data-wp-class--hide="state.isContentHidden" data-wp-class--show="state.isContentVisible" data-wp-init="callbacks.setButtonStyles" data-wp-on--click="actions.showLightbox" data-wp-on--load="callbacks.setButtonStyles" data-wp-on-window--resize="callbacks.setButtonStyles" src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXfT3wR4VEUBjjyLLKlkNXHo-DqA01N8X4inkwKtk9uUrkZbKEvHJNhib_iEyjpDgWgw3UbXaHgK8bL4N8kinr9NVp9HzRQLv4N0annPOE97qe_BpA3ih_p67t9cX5MhMUt2y0kH8g?key=mSOWS9YytkdtMkpS22SyHta5" alt="Hahow 全球第一個募資型跨領域線上課程平台"/><button
			class="lightbox-trigger"
			type="button"
			aria-haspopup="dialog"
			aria-label="Enlarge"
			data-wp-init="callbacks.initTriggerButton"
			data-wp-on--click="actions.showLightbox"
			data-wp-style--right="state.imageButtonRight"
			data-wp-style--top="state.imageButtonTop"
		>
			<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" fill="none" viewBox="0 0 12 12">
				<path fill="#fff" d="M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z" />
			</svg>
		</button><figcaption class="wp-element-caption">Hahow 全球第一個募資型跨領域線上課程平台&nbsp;</figcaption></figure>



<p class=""></p>



<p class="">我們下篇文章見～</p>



<p class="has-text-align-right">Sharon</p>



<hr class="is-style-wide wp-block-separator has-alpha-channel-opacity"/>



<p class="has-medium-font-size"><strong>Buy me a coffee&nbsp; 用行動支持我的內容創作</strong></p>



<p class=""><em>如果我的文章對你有幫助，歡迎用行動支持我的內容創作，小額贊助請我喝咖啡、留言或是寄信來跟我分享你的收穫，都會讓我持續有動力分享更多內容唷～</em></p>



<div class="wp-block-buttons is-layout-flex wp-block-buttons-is-layout-flex">
<div class="aligncenter is-style-fill wp-block-button"><a class="wp-block-button__link has-black-color has-luminous-vivid-amber-background-color has-text-color has-background wp-element-button" href="https://www.buymeacoffee.com/aderlabsharon" target="_blank" rel="noreferrer noopener">以小額贊助支持Sharon</a></div>
</div>



<p class=""></p>
<p>這篇文章 <a href="https://aderlab.com/data-analytics/tableau-self-learning/">數據分析師必看！Tableau 自學指南：技能解析、應用實例與學習心得分享</a> 最早出現於 <a href="https://aderlab.com">Sharon Lab∣雪倫實驗室</a>。</p>
]]></content:encoded>
					
					<wfw:commentRss>https://aderlab.com/data-analytics/tableau-self-learning/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		<enclosure url="https://aderlab.com/wp-content/uploads/Dynamic_ranking-1.mov" length="8272325" type="video/quicktime" />

		<post-id xmlns="com-wordpress:feed-additions:1">5454</post-id>	</item>
		<item>
		<title>寫SQL前的重要概念，學起來讓查詢建表更順利！</title>
		<link>https://aderlab.com/data-analytics/sql-concept/</link>
		
		<dc:creator><![CDATA[Sharon]]></dc:creator>
		<pubDate>Sun, 17 Dec 2023 04:34:36 +0000</pubDate>
				<category><![CDATA[數據分析]]></category>
		<category><![CDATA[職涯點滴]]></category>
		<guid isPermaLink="false">https://aderlab.com/?p=5367</guid>

					<description><![CDATA[<p>SQL，是數據分析師的必備職場技能之一，不過SQL到底是用來做什麼的呢？SQL的英文全稱是Structured Query Language，中文則是結構化查詢&#8230;</p>
<p><a href="https://aderlab.com/data-analytics/sql-concept/" class="btn-continue">繼續閱讀<span class="arrow-continue">&#8594;</span></a></p>
<p>這篇文章 <a href="https://aderlab.com/data-analytics/sql-concept/">寫SQL前的重要概念，學起來讓查詢建表更順利！</a> 最早出現於 <a href="https://aderlab.com">Sharon Lab∣雪倫實驗室</a>。</p>
]]></description>
										<content:encoded><![CDATA[
<p class="">SQL，是數據分析師的必備職場技能之一，不過SQL到底是用來做什麼的呢？SQL的英文全稱是Structured Query Language，中文則是結構化查詢語言，簡單來說，如果想要在資料庫找到資料，想要在資料庫創建新的資料表，SQL就是一套可以讀取資料庫以及儲存資料的語法。</p>



<p class="">剛轉職數據分析師時，雖然透過自學、大量刷題了解了SQL的基本語法，但是實際成為數據分析師之後，常常會發現現實中的數據比起題庫的資料來的複雜得多，例如，left join 的 key value 可能不只一個，Dimension table的值會出現重複值，創建一個表可能要找10幾20個資料表才能完整創建出來等，這一篇來分享我從寫 SQL過程中得到的重要概念。</p>



<h2 class="wp-block-heading">釐清定義比直接埋頭苦寫更重要</h2>



<p class="">剛開始寫SQL時我有一個壞習慣，那就是收到需求後，想也不想就直覺性的去找資料表，然後急著把需求解決掉。這樣的習慣在簡單的資料查詢相對不會有問題，但只要遇到資料串接、建資料表等比較複雜的資料處理，這個習慣容易造成資料表雖然指令沒有 Error，但是最終呈現的資料是錯誤的，或是不符合需求單位的需求。</p>



<p class="">我印象深刻有一次，我要查詢消費者的熱門消費城市，也就是呈現每個城市的消費人數、消費金額、消費訂單數，需要將訂單資料表連結客戶資料表，才能找到客戶所在的城市。但問題來了，所謂的「消費城市」到底要依哪個地址為主？是應該依消費者留的通訊地址來判斷？還是依消費者留的取貨地址來判斷？如果一個消費者通訊地址在台北市，送貨地址在桃園市，那應該把這筆訂單歸類在哪個縣市呢？這個問題沒有標準答案，「通訊地址」與「送貨地址」其實都可以，但是，究竟應該抓哪一個，就需要跟需求單位討論、確認才能知道。</p>



<p class="">從這個例子來看，當我沒有在寫表前先想好需要釐清的「定義」，在寫SQL查詢的過程中就容易一直卡住，甚至是遠離需求單位撈資料需求，讓自己白做工。</p>



<h2 class="wp-block-heading">不只一次機會，不會就多試幾次</h2>



<p class="">當 SQL 語法跟資料庫的規則不一樣的時候，送出查詢指令後系統就會報Error，例如語法錯誤可能會跳出 “missing expression”，寫錯資料表所在位置可能會跳出“table or view does not exist”，刷題過程不符合題旨查詢結果可能會跳出 “Wrong Answer”等。</p>



<p class="">起初接觸這個語法我也常常是滿滿的 Error ，一道SQL題目可能需要送出個4、5次才有辦法成功解題，出現錯誤總是讓我覺得心情很煩躁，想不到該怎麼解題，該用哪個語法也常常讓我懷疑自己能不能掌握這項技能，直到有一次，我在公司偶然看到每天都在寫SQL建表的工程師螢幕畫面，也出現了iT邦幫忙的查詢頁面，我才發現，原來每個人都一樣，每個人會有自己處理問題過程卡住的時候，也會有需要往外找資源、找資料的時候，不用因為覺得自己需要查參考範例就覺得自己不行的心態，寫SQL或是任何事情其實都一樣，過程中我們多多少少都會不熟戲、多多少少會做得不好、也可能都會犯錯，但是，改錯之後，結果好就好了啊，誰會在乎你寫SQL的過程中 Error 報錯幾次呢？誰會在乎成功的企業家過去失敗過幾次呢？不會就多找找資料，多看看別人怎麼寫，多試幾次總有一天會刻在自己的腦袋深處的！</p>



<h2 class="wp-block-heading">搞懂規則，規則不對硬送指令也沒用</h2>



<p class="">這個體悟發生在我轉換工作，使用不同資料庫系統的時候，雖然都是資料庫，但是不同的資料庫體系可能會在特定的語法中有不同的語法規則，以擷取現在時間的日期寫法為例，MySQL是用 NOW()，SQL Server則是用GETDATE()，讓我一開始超級不適應，甚至會做一些蠢事，例如同樣的語法修也不修，就直接再送一次查詢，想當然爾就是再次看到 Error。</p>



<p class="">轉換不同的資料庫系統，最重要的第一步絕對是搞清楚那套資料庫的語法規則是什麼，如果抱持著不更變的心態，在規則不對的情況下，就算是一樣的指令送了100次也不會從 Error 變成 Accepted。在熟悉規則的過程雖然很麻煩，也很不適應，但是當規則內化成習慣，下次就會得心應手了！</p>



<h2 class="wp-block-heading">同樣的結果，解法不只一種</h2>



<p class="">SQL雖然是一種有固定語法的語言，但同樣的資料查詢需求，寫法往往不只一種。如果你刷過SQL題目，可以特別注意討論串的留言內容，你就會發現同樣的題目，其他人可能會分享出不同的寫法，這也是我過去在煩悶的SQL刷題中，覺得特別有趣、特別可以引發我好奇心的環節。</p>



<p class="">以同樣是要找演員跟導演合作超過3次的查詢題目來說，有人可能直接用 Having 的語法來計算次數並做篩選，有人可能先用子查詢 + group by 語法後，再用 where 來篩選出3次以上的資料數，做法不同，但可以透過觀摩不同人的寫法，看看有沒有更簡易的寫法，了解相對不熟悉的語法，未來在不同的應用場景也可以更彈性的應用。</p>



<h2 class="wp-block-heading">別想著一步到位，小規模測試更有效率</h2>



<p class="">在我第一次幫忙建表的時候，我就犯下了這個想要一步到位的錯誤。那份資料需求是想看看過去6個月的庫存變動資料，需要從期初的庫存減掉過去6個月實際銷售出去的商品數量，同時還要考慮不同倉位的倉位庫存調動、銷售出去但是後來消費者退貨退回來的數量。聽到這個需求，是不是聽起來就很複雜？沒錯，超級複雜的！</p>



<p class="">但當時的我完全沒想著要小規模測試，居然直接開始從6個月的資料開始查詢，到最後雖然資料表寫完了，卻因為資料太大，我完全不知道要從哪裡開始驗證，最後只好再回到第一個步驟重新來過，後來，我改成以一個禮拜的資料調整，看看資料串連計算後跟當週期末的庫存數數字有沒有對上，等到小範圍的數據驗證沒有問題之後，才再放大資料範圍。</p>



<p class="">這個例子完全驗證了貪心想要一步到位的最後下場：被淹沒在資料海裡，當資料筆數幾十萬筆甚至幾百萬筆，我們更需要在過程中建立小範圍的簡單測試，甚至是在不同的資料處理步驟都再驗一次資料，確保沒有因為聯集、交集寫錯、遺漏資料，才不會最後滿心歡喜地寫完資料表，卻發現錯誤百出。</p>



<p class="has-text-align-right">Sharon</p>



<hr class="is-style-wide wp-block-separator has-alpha-channel-opacity"/>



<p class="has-medium-font-size"><strong>Buy me a coffee&nbsp; 用行動支持我的內容創作</strong></p>



<p class=""><em>如果我的文章對你有幫助，歡迎用行動支持我的內容創作，小額贊助請我喝咖啡、留言或是寄信來跟我分享你的收穫，都會讓我持續有動力分享更多內容唷～</em></p>



<div class="wp-block-buttons is-layout-flex wp-block-buttons-is-layout-flex">
<div class="aligncenter is-style-fill wp-block-button"><a class="wp-block-button__link has-black-color has-luminous-vivid-amber-background-color has-text-color has-background wp-element-button" href="https://www.buymeacoffee.com/aderlabsharon" target="_blank" rel="noreferrer noopener">以小額贊助支持Sharon</a></div>
</div>
<p>這篇文章 <a href="https://aderlab.com/data-analytics/sql-concept/">寫SQL前的重要概念，學起來讓查詢建表更順利！</a> 最早出現於 <a href="https://aderlab.com">Sharon Lab∣雪倫實驗室</a>。</p>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">5367</post-id>	</item>
		<item>
		<title>【Tableau 教學】 實用小技巧：自訂偏好顏色</title>
		<link>https://aderlab.com/data-analytics/tableau-custom-color/</link>
		
		<dc:creator><![CDATA[Sharon]]></dc:creator>
		<pubDate>Sun, 12 Nov 2023 01:00:00 +0000</pubDate>
				<category><![CDATA[Tableau]]></category>
		<category><![CDATA[數據分析]]></category>
		<guid isPermaLink="false">https://aderlab.com/?p=5316</guid>

					<description><![CDATA[<p>你有曾經覺得 Tableau 預設的顏色不夠用嗎？如果你有，你不孤單，我也是！這篇文章簡單來談談，如果顏色不夠用，該怎麼「自訂顏色」。 找顏色色號 在上傳自定顏&#8230;</p>
<p><a href="https://aderlab.com/data-analytics/tableau-custom-color/" class="btn-continue">繼續閱讀<span class="arrow-continue">&#8594;</span></a></p>
<p>這篇文章 <a href="https://aderlab.com/data-analytics/tableau-custom-color/">【Tableau 教學】 實用小技巧：自訂偏好顏色</a> 最早出現於 <a href="https://aderlab.com">Sharon Lab∣雪倫實驗室</a>。</p>
]]></description>
										<content:encoded><![CDATA[
<p class="">你有曾經覺得 Tableau 預設的顏色不夠用嗎？如果你有，你不孤單，我也是！這篇文章簡單來談談，如果顏色不夠用，該怎麼「自訂顏色」。</p>



<h2 class="wp-block-heading">找顏色色號</h2>



<p class="">在上傳自定顏色之前，我們得先找好想要上傳的顏色色碼是什麼，這個大家只要任意搜尋「色碼表」、「顏色色號」，在網路上都可以找到很多資訊，Tableau的色碼接受的是以#開頭的色碼，例如白色的色碼是#FFFFFF、黑色的色碼是#000000，可以先把喜歡的顏色色碼用個記事本或是Word檔案複製起來。</p>



<h2 class="wp-block-heading">設定 Tableau 的偏好設定檔</h2>



<p class="">Tableau 的偏好設定XML檔叫做Preferences.tps，通常位於 Documents 檔案夾裡的「我的 Tableau 存放庫（My Tableau Repository）」，你可以使用「Notepad」、「記事本」或是Mac的「TextEdit」開啟，開啟之後會是只有三段程式碼的樣子，代表目前沒有設定任何自訂的偏好設定。</p>



<figure class="wp-block-image size-large"><a href="https://i0.wp.com/aderlab.com/wp-content/uploads/myplace.png?ssl=1"><img data-recalc-dims="1" loading="lazy" decoding="async" width="708" height="179" src="https://i0.wp.com/aderlab.com/wp-content/uploads/myplace.png?resize=708%2C179&#038;ssl=1" alt="" class="wp-image-5322" srcset="https://i0.wp.com/aderlab.com/wp-content/uploads/myplace.png?resize=1024%2C259&amp;ssl=1 1024w, https://i0.wp.com/aderlab.com/wp-content/uploads/myplace.png?resize=300%2C76&amp;ssl=1 300w, https://i0.wp.com/aderlab.com/wp-content/uploads/myplace.png?resize=768%2C194&amp;ssl=1 768w, https://i0.wp.com/aderlab.com/wp-content/uploads/myplace.png?resize=1536%2C389&amp;ssl=1 1536w, https://i0.wp.com/aderlab.com/wp-content/uploads/myplace.png?resize=2048%2C518&amp;ssl=1 2048w, https://i0.wp.com/aderlab.com/wp-content/uploads/myplace.png?w=1416&amp;ssl=1 1416w, https://i0.wp.com/aderlab.com/wp-content/uploads/myplace.png?w=2124&amp;ssl=1 2124w" sizes="auto, (max-width: 708px) 100vw, 708px" /></a></figure>



<figure class="wp-block-image size-large"><a href="https://i0.wp.com/aderlab.com/wp-content/uploads/preferences-1.png?ssl=1"><img data-recalc-dims="1" loading="lazy" decoding="async" width="708" height="195" src="https://i0.wp.com/aderlab.com/wp-content/uploads/preferences-1.png?resize=708%2C195&#038;ssl=1" alt="" class="wp-image-5326" srcset="https://i0.wp.com/aderlab.com/wp-content/uploads/preferences-1.png?resize=1024%2C282&amp;ssl=1 1024w, https://i0.wp.com/aderlab.com/wp-content/uploads/preferences-1.png?resize=300%2C83&amp;ssl=1 300w, https://i0.wp.com/aderlab.com/wp-content/uploads/preferences-1.png?resize=768%2C211&amp;ssl=1 768w, https://i0.wp.com/aderlab.com/wp-content/uploads/preferences-1.png?resize=1536%2C423&amp;ssl=1 1536w, https://i0.wp.com/aderlab.com/wp-content/uploads/preferences-1.png?resize=2048%2C563&amp;ssl=1 2048w, https://i0.wp.com/aderlab.com/wp-content/uploads/preferences-1.png?w=1416&amp;ssl=1 1416w, https://i0.wp.com/aderlab.com/wp-content/uploads/preferences-1.png?w=2124&amp;ssl=1 2124w" sizes="auto, (max-width: 708px) 100vw, 708px" /></a></figure>



<figure class="wp-block-image size-large"><a href="https://i0.wp.com/aderlab.com/wp-content/uploads/notebook_ori.png?ssl=1"><img data-recalc-dims="1" loading="lazy" decoding="async" width="708" height="237" src="https://i0.wp.com/aderlab.com/wp-content/uploads/notebook_ori.png?resize=708%2C237&#038;ssl=1" alt="" class="wp-image-5324" srcset="https://i0.wp.com/aderlab.com/wp-content/uploads/notebook_ori.png?resize=1024%2C343&amp;ssl=1 1024w, https://i0.wp.com/aderlab.com/wp-content/uploads/notebook_ori.png?resize=300%2C100&amp;ssl=1 300w, https://i0.wp.com/aderlab.com/wp-content/uploads/notebook_ori.png?resize=768%2C257&amp;ssl=1 768w, https://i0.wp.com/aderlab.com/wp-content/uploads/notebook_ori.png?resize=1536%2C514&amp;ssl=1 1536w, https://i0.wp.com/aderlab.com/wp-content/uploads/notebook_ori.png?w=2014&amp;ssl=1 2014w, https://i0.wp.com/aderlab.com/wp-content/uploads/notebook_ori.png?w=1416&amp;ssl=1 1416w" sizes="auto, (max-width: 708px) 100vw, 708px" /></a></figure>



<h3 class="wp-block-heading">分類顏色程式碼（單色）</h3>



<pre class="wp-block-code"><code>&lt;preferences>
&lt;color-palette name="<strong><em>My Custom Color</em></strong>" type="regular">

<strong><em>&lt;color>#eb912b&lt;/color>
&lt;color>#7099a5&lt;/color>
&lt;color>#c71f34&lt;/color></em></strong>

&lt;/color-palette>
&lt;/preferences></code></pre>



<h3 class="wp-block-heading">連續顏色程式碼（單色）</h3>



<p class="">上傳顏色色碼時顏色建議為單一顏色不同深淺的顏色，例如都是橘色色調，但是是不同深淺度的橘色。</p>



<pre class="wp-block-code"><code>&lt;preferences>
&lt;color-palette name="<strong><em>My Custom Color</em></strong>" type="ordered-sequential">

<strong><em>&lt;color>#eb912b&lt;/color>
&lt;color>#eb9c42&lt;/color>
&lt;color>#ebad67&lt;/color></em></strong>

&lt;/color-palette>
&lt;/preferences></code></pre>



<h3 class="wp-block-heading">分散顏色程式碼（多色）</h3>



<pre class="wp-block-code"><code>&lt;preferences>
&lt;color-palette name="<strong><em>My Custom Color</em></strong>" type="ordered-diverging">

<strong><em>&lt;color>#eb912b&lt;/color>
&lt;color>#7099a5&lt;/color>
&lt;color>#c71f34&lt;/color></em></strong>

&lt;/color-palette>
&lt;/preferences></code></pre>



<h3 class="wp-block-heading">三種類型一起設定的程式碼</h3>



<pre class="wp-block-code"><code>&lt;preferences>
&lt;color-palette name="<strong><em>My Custom Color</em></strong>" type="regular">

<strong><em>&lt;color>#eb912b&lt;/color>
&lt;color>#7099a5&lt;/color>
&lt;color>#c71f34&lt;/color></em></strong>

&lt;/color-palette>

&lt;color-palette name="<strong><strong><em>My Custom Color</em></strong></strong>" type="ordered-sequential">

<strong><em>&lt;color>#eb912b&lt;/color>
&lt;color>#7099a5&lt;/color>
&lt;color>#c71f34&lt;/color></em></strong>

&lt;/color-palette>

&lt;color-palette name="<strong><em>My Custom Color</em></strong>" type="ordered-diverging">

<strong><em>&lt;color>#eb912b&lt;/color>
&lt;color>#7099a5&lt;/color>
&lt;color>#c71f34&lt;/color></em></strong>

&lt;/color-palette>
&lt;/preferences></code></pre>



<p class="">接著，請依照你需要的顏色調色盤類型，複製上述對應的程式碼到你的Preferences.tps檔案裡，放在&lt;workbook>&lt;/workbook>中間，如下圖所示，接著有兩個地方需要修改。</p>



<figure class="wp-block-image size-large"><a href="https://i0.wp.com/aderlab.com/wp-content/uploads/result-2-1024x660.png?ssl=1"><img data-recalc-dims="1" loading="lazy" decoding="async" width="708" height="456" src="https://i0.wp.com/aderlab.com/wp-content/uploads/result-2.png?resize=708%2C456&#038;ssl=1" alt="" class="wp-image-5323" srcset="https://i0.wp.com/aderlab.com/wp-content/uploads/result-2.png?resize=1024%2C660&amp;ssl=1 1024w, https://i0.wp.com/aderlab.com/wp-content/uploads/result-2.png?resize=300%2C193&amp;ssl=1 300w, https://i0.wp.com/aderlab.com/wp-content/uploads/result-2.png?resize=768%2C495&amp;ssl=1 768w, https://i0.wp.com/aderlab.com/wp-content/uploads/result-2.png?resize=1536%2C989&amp;ssl=1 1536w, https://i0.wp.com/aderlab.com/wp-content/uploads/result-2.png?w=1928&amp;ssl=1 1928w, https://i0.wp.com/aderlab.com/wp-content/uploads/result-2.png?w=1416&amp;ssl=1 1416w" sizes="auto, (max-width: 708px) 100vw, 708px" /></a></figure>



<p class="">1. 更改你的調色盤的名稱 <br>把程式碼裡面的「My Categorical Palette」換成任何你想要取的名稱。</p>



<p class="">2. 將顏色更改成你要的顏色<br>以我的範例來說，我自訂了3個顏色，如果你也剛剛好只需要3個，就可以直接更改中間3行以 &lt;color>&lt;/color> 開頭與結尾中間的內容，中間的內容改成你想要使用的顏色色碼。如果你需要多於或少於3個顏色，那也很簡單，只需要新增&lt;color>&lt;/color>的行數，改成你想要的顏色數即可。</p>



<p class="">修改完上述的程式碼之後，再重新開啟 Tableau，點選顏色的選項，你就會看到你設定的自定調色盤的選項了！</p>



<h2 class="wp-block-heading">分類顏色 v.s. 連續顏色 v.s. 發散顏色</h2>



<p class="">最後，我們來聊聊什麼時候要用分類顏色？什麼時候連續顏色？什麼時候又要用發散顏色呢？</p>



<p class="">分類顏色簡單來說是用在「離散型資料」，例如說文字資料、離散的日期資料，大部分的維度都屬於離散型資料，在Tableau裡面會以「藍色」呈現。相反的，可以進行加減乘除計算的數字型資料、連續日期，就屬於「連續型資料」，在Tableau裡面會以「綠色」呈現，這類的資料通常是量值，顏色則可以選擇連續顏色（單一顏色，但是以顏色深淺區分數值的大小值），或是發散顏色（多個顏色，以顏色差異區分數值級距與差異）。</p>



<p class="">好啦，關於自訂色彩的小技巧就分享到這裡，下篇文章見 : )</p>



<p class="has-text-align-right">Sharon</p>



<hr class="is-style-wide wp-block-separator has-alpha-channel-opacity"/>



<p class="has-medium-font-size"><strong>Buy me a coffee&nbsp; 用行動支持我的內容創作</strong></p>



<p class=""><em>如果我的文章對你有幫助，歡迎用行動支持我的內容創作，小額贊助請我喝咖啡、留言或是寄信來跟我分享你的收穫，都會讓我持續有動力分享更多內容唷～</em></p>



<div class="wp-block-buttons is-layout-flex wp-block-buttons-is-layout-flex">
<div class="aligncenter is-style-fill wp-block-button"><a class="wp-block-button__link has-black-color has-luminous-vivid-amber-background-color has-text-color has-background wp-element-button" href="https://www.buymeacoffee.com/aderlabsharon" target="_blank" rel="noreferrer noopener">以小額贊助支持Sharon</a></div>
</div>
<p>這篇文章 <a href="https://aderlab.com/data-analytics/tableau-custom-color/">【Tableau 教學】 實用小技巧：自訂偏好顏色</a> 最早出現於 <a href="https://aderlab.com">Sharon Lab∣雪倫實驗室</a>。</p>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">5316</post-id>	</item>
		<item>
		<title>【Tableau教學】一篇了解 Tableau 參數是什麼！詳細定義、設定與應用場景說明</title>
		<link>https://aderlab.com/data-analytics/tableau-parameter/</link>
		
		<dc:creator><![CDATA[Sharon]]></dc:creator>
		<pubDate>Sun, 22 Oct 2023 01:00:00 +0000</pubDate>
				<category><![CDATA[Tableau]]></category>
		<category><![CDATA[數據分析]]></category>
		<guid isPermaLink="false">https://aderlab.com/?p=5265</guid>

					<description><![CDATA[<p>如果想要善用 Tableau 設計互動式報表，篩選器與參數應用絕對是你不可或缺的能力！所以你會發現，我在 這幾篇的動態圖表，都非常頻繁的使用到參數與篩選器，這一&#8230;</p>
<p><a href="https://aderlab.com/data-analytics/tableau-parameter/" class="btn-continue">繼續閱讀<span class="arrow-continue">&#8594;</span></a></p>
<p>這篇文章 <a href="https://aderlab.com/data-analytics/tableau-parameter/">【Tableau教學】一篇了解 Tableau 參數是什麼！詳細定義、設定與應用場景說明</a> 最早出現於 <a href="https://aderlab.com">Sharon Lab∣雪倫實驗室</a>。</p>
]]></description>
										<content:encoded><![CDATA[
<p class="">如果想要善用 Tableau 設計互動式報表，篩選器與參數應用絕對是你不可或缺的能力！所以你會發現，我在 這幾篇的動態圖表，都非常頻繁的使用到參數與篩選器，這一篇先來談談參數，我會從官方的定義開始介紹參數是什麼？參數設定教學？參數有哪些應用場景？希望讓你對 Tableau 參數使用更熟悉，那就開始囉！</p>



<h2 class="wp-block-heading">什麼是 Tableau 參數？</h2>



<p class="">根據 <a href="https://help.tableau.com/current/pro/desktop/zh-tw/parameters_create.htm#%E5%BB%BA%E7%AB%8B%E5%8F%83%E6%95%B8">Tableau 官方說明</a>，Tableau參數的定義是：</p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p class="">參數是工作簿預留位置值（像是數字、日期或字串），可以取代計算、篩選器或參考線中的常數值。</p>
</blockquote>



<p class="">單看這句話可能有點抽象難懂，但是從這定義我們可以知道的是，參數主要有三個適用場景：應用於計算欄位、當作篩選器使用以及圖表參考線，但不論是哪一種使用情境，我們都需要在建立參數值後，再設定參數值的應用欄位或作用位置，參數在後續變動時才可以影響最終的數據呈現（下面的應用場景說明會更詳細說明這個概念）。</p>



<p class="">至於為工作簿預留值的這句話，我們可以簡單理解成，如果你有任何想要讓使用者自由輸入、調整值的使用情境，你就可以使用參數達到自由更換的效果，例如：想讓使用者可以自由切換數據指標，可以任意切換成銷售量、銷售額、毛利、淨利，又或是自由切換欄位排序順序、當然，也可以透過參數來動態調整篩選器的篩選範圍。</p>



<h2 class="wp-block-heading">Tableau 參數設定畫面介紹</h2>



<h3 class="wp-block-heading">怎麼建立Tableau 參數？</h3>



<p class="">方法1：左側空白處直接按右鍵</p>



<figure class="wp-block-image size-large"><a href="https://i0.wp.com/aderlab.com/wp-content/uploads/Slide4.jpeg?ssl=1"><img data-recalc-dims="1" loading="lazy" decoding="async" width="708" height="398" src="https://i0.wp.com/aderlab.com/wp-content/uploads/Slide4.jpeg?resize=708%2C398&#038;ssl=1" alt="" class="wp-image-5267" srcset="https://i0.wp.com/aderlab.com/wp-content/uploads/Slide4.jpeg?resize=1024%2C576&amp;ssl=1 1024w, https://i0.wp.com/aderlab.com/wp-content/uploads/Slide4.jpeg?resize=300%2C169&amp;ssl=1 300w, https://i0.wp.com/aderlab.com/wp-content/uploads/Slide4.jpeg?resize=768%2C432&amp;ssl=1 768w, https://i0.wp.com/aderlab.com/wp-content/uploads/Slide4.jpeg?resize=1536%2C864&amp;ssl=1 1536w, https://i0.wp.com/aderlab.com/wp-content/uploads/Slide4.jpeg?w=1801&amp;ssl=1 1801w, https://i0.wp.com/aderlab.com/wp-content/uploads/Slide4.jpeg?w=1416&amp;ssl=1 1416w" sizes="auto, (max-width: 708px) 100vw, 708px" /></a></figure>



<p class="">方法2：選維度或指標後，按右鍵建立</p>



<figure class="wp-block-image size-large"><a href="https://i0.wp.com/aderlab.com/wp-content/uploads/Slide21.jpeg?ssl=1"><img data-recalc-dims="1" loading="lazy" decoding="async" width="708" height="398" src="https://i0.wp.com/aderlab.com/wp-content/uploads/Slide21.jpeg?resize=708%2C398&#038;ssl=1" alt="" class="wp-image-5296" srcset="https://i0.wp.com/aderlab.com/wp-content/uploads/Slide21.jpeg?resize=1024%2C576&amp;ssl=1 1024w, https://i0.wp.com/aderlab.com/wp-content/uploads/Slide21.jpeg?resize=300%2C169&amp;ssl=1 300w, https://i0.wp.com/aderlab.com/wp-content/uploads/Slide21.jpeg?resize=768%2C432&amp;ssl=1 768w, https://i0.wp.com/aderlab.com/wp-content/uploads/Slide21.jpeg?resize=1536%2C864&amp;ssl=1 1536w, https://i0.wp.com/aderlab.com/wp-content/uploads/Slide21.jpeg?w=1801&amp;ssl=1 1801w, https://i0.wp.com/aderlab.com/wp-content/uploads/Slide21.jpeg?w=1416&amp;ssl=1 1416w" sizes="auto, (max-width: 708px) 100vw, 708px" /></a></figure>



<p class="">選維度或指標後再建立參數跟上述的方法有什麼差別？老實說沒有，但是，如果你是需要輸入特定欄位的清單或是數值，直接選擇相關的維度或指標非常方便。為什麼這樣說呢？我舉個例子來說，假設，我想建立一個產品次分類的參數清單，我直接在產品次分類這個維度點右鍵建立參數，你會發現參數設定一打開，就已經套用好這個維度的資料類型以及對應的資料清單（如下圖），你連打字都不用打，是不是超便利的！</p>



<figure class="wp-block-image size-large"><a href="https://i0.wp.com/aderlab.com/wp-content/uploads/Screen-Shot-2023-10-21-at-10.53.25-PM.png?ssl=1"><img data-recalc-dims="1" loading="lazy" decoding="async" width="708" height="390" src="https://i0.wp.com/aderlab.com/wp-content/uploads/Screen-Shot-2023-10-21-at-10.53.25-PM.png?resize=708%2C390&#038;ssl=1" alt="" class="wp-image-5294" srcset="https://i0.wp.com/aderlab.com/wp-content/uploads/Screen-Shot-2023-10-21-at-10.53.25-PM.png?resize=1024%2C564&amp;ssl=1 1024w, https://i0.wp.com/aderlab.com/wp-content/uploads/Screen-Shot-2023-10-21-at-10.53.25-PM.png?resize=300%2C165&amp;ssl=1 300w, https://i0.wp.com/aderlab.com/wp-content/uploads/Screen-Shot-2023-10-21-at-10.53.25-PM.png?resize=768%2C423&amp;ssl=1 768w, https://i0.wp.com/aderlab.com/wp-content/uploads/Screen-Shot-2023-10-21-at-10.53.25-PM.png?resize=1536%2C846&amp;ssl=1 1536w, https://i0.wp.com/aderlab.com/wp-content/uploads/Screen-Shot-2023-10-21-at-10.53.25-PM.png?resize=2048%2C1128&amp;ssl=1 2048w, https://i0.wp.com/aderlab.com/wp-content/uploads/Screen-Shot-2023-10-21-at-10.53.25-PM.png?w=1416&amp;ssl=1 1416w, https://i0.wp.com/aderlab.com/wp-content/uploads/Screen-Shot-2023-10-21-at-10.53.25-PM.png?w=2124&amp;ssl=1 2124w" sizes="auto, (max-width: 708px) 100vw, 708px" /></a></figure>



<p class="">如果你想要參考某欄位新增清單是不是只有這個設定辦法？其實也不是，這就是這套視覺化工具好用的地方，總是有各種方式可以達到一樣的設定效果！除了上述的方法之外，你還可以用右下角的選項「從以下位置新增值」，接著挑選你想要匯入當作清單範圍的維度或指標，一樣可以把那個欄位的值自動建立起來，這在建立日期清單、國家清單的時候特別好用。</p>



<h3 class="wp-block-heading">Tableau 參數畫面</h3>



<p class="">Tableau 參數設定時最重要的三大重點：資料類型、當前值以及允許值。</p>



<figure class="wp-block-image size-large"><a href="https://i0.wp.com/aderlab.com/wp-content/uploads/Presentation1.png?ssl=1"><img data-recalc-dims="1" loading="lazy" decoding="async" width="708" height="398" src="https://i0.wp.com/aderlab.com/wp-content/uploads/Presentation1.png?resize=708%2C398&#038;ssl=1" alt="" class="wp-image-5297" srcset="https://i0.wp.com/aderlab.com/wp-content/uploads/Presentation1.png?resize=1024%2C576&amp;ssl=1 1024w, https://i0.wp.com/aderlab.com/wp-content/uploads/Presentation1.png?resize=300%2C169&amp;ssl=1 300w, https://i0.wp.com/aderlab.com/wp-content/uploads/Presentation1.png?resize=768%2C432&amp;ssl=1 768w, https://i0.wp.com/aderlab.com/wp-content/uploads/Presentation1.png?resize=1536%2C864&amp;ssl=1 1536w, https://i0.wp.com/aderlab.com/wp-content/uploads/Presentation1.png?w=1801&amp;ssl=1 1801w, https://i0.wp.com/aderlab.com/wp-content/uploads/Presentation1.png?w=1416&amp;ssl=1 1416w" sizes="auto, (max-width: 708px) 100vw, 708px" /></a></figure>



<p class="">資料類型包括：浮點數（可接受小數點）、整數、字串（文字）、布林值（True/False）、日期、日期時間，不要看這個好像很簡單不起眼，特別容易忽略的就是浮點數與整數，使用前建議還是要特別注意這個欄位有沒有設定好。當前值則是指你希望預設值的資料是什麼。而允許值可以分成全部、清單以及範圍，全部指的是參數欄位在使用者的顯示畫面會呈現一個空白的方格，需要自行輸入資料，參數應用的彈性最大；清單則是指你設計特定的資料內容，例如你只設定：清單內容A、B、C，那使用者在使用時，就只能選擇A、B、C三個擇一的選項，至於範圍則是最常應用在整數或是浮點數，如果你有建議的數值範圍，那就可以使用範圍，設定最大與最小數值，並且設定每個數值之間的間隔區間。</p>



<p class="">如果是字串、布林、日期相關的資料類型，最推薦的設定方式是使用清單設定，而數值相關的話則是三種允許值都適合，就看哪個對於當下的報表使用最適合而定。</p>



<h2 class="wp-block-heading">Tableau 參數的三大應用場景</h2>



<h3 class="wp-block-heading">使用場景一：計算欄位</h3>



<p class="">當你的計算內容需要動態變動的時候，參數就是你的好幫手，什麼時候可能需要變動呢？我舉幾個實務上會常常使用到的例子讓大家更好理解。</p>



<h4 class="wp-block-heading">情境1：預估數字</h4>



<p class="">例如，你不知道產品的確切毛利率是多少，但是你知道一個毛利率的區間，假設是20%-40%好了，那你就可以透過建立「毛利率」參數，動態調整毛利率值，並且在調整毛利率之後，自動計算對應的毛利額是多少。說到這裡，你應該可以想像，我們需要建立一個建立「毛利率」參數，並且建立一個對應的計算欄位：毛利額，用銷售額 x 毛利率參數的公式得出對應的毛利額。</p>



<p class="">步驟1：建立毛利率範圍參數</p>



<figure class="wp-block-image size-large"><a href="https://i0.wp.com/aderlab.com/wp-content/uploads/Slide5.jpeg?ssl=1"><img data-recalc-dims="1" loading="lazy" decoding="async" width="708" height="398" src="https://i0.wp.com/aderlab.com/wp-content/uploads/Slide5.jpeg?resize=708%2C398&#038;ssl=1" alt="" class="wp-image-5268" srcset="https://i0.wp.com/aderlab.com/wp-content/uploads/Slide5.jpeg?resize=1024%2C576&amp;ssl=1 1024w, https://i0.wp.com/aderlab.com/wp-content/uploads/Slide5.jpeg?resize=300%2C169&amp;ssl=1 300w, https://i0.wp.com/aderlab.com/wp-content/uploads/Slide5.jpeg?resize=768%2C432&amp;ssl=1 768w, https://i0.wp.com/aderlab.com/wp-content/uploads/Slide5.jpeg?resize=1536%2C864&amp;ssl=1 1536w, https://i0.wp.com/aderlab.com/wp-content/uploads/Slide5.jpeg?w=1801&amp;ssl=1 1801w, https://i0.wp.com/aderlab.com/wp-content/uploads/Slide5.jpeg?w=1416&amp;ssl=1 1416w" sizes="auto, (max-width: 708px) 100vw, 708px" /></a></figure>



<p class=""></p>



<p class="">步驟2：讓參數與欄位建立關聯<br>參數本身沒有意義，只有在我們建立計算欄位之後，使用含有參數的欄位之後，參數才能發揮讓我們彈性動態調整介面的效果。回到上面的預估毛利額的例子，就需要建立計算欄位：</p>



<pre class="wp-block-code"><code>&#91;銷售額]*&#91;毛利率範圍]</code></pre>



<figure class="wp-block-image size-large"><a href="https://i0.wp.com/aderlab.com/wp-content/uploads/Slide7.jpeg?ssl=1"><img data-recalc-dims="1" loading="lazy" decoding="async" width="708" height="398" src="https://i0.wp.com/aderlab.com/wp-content/uploads/Slide7.jpeg?resize=708%2C398&#038;ssl=1" alt="" class="wp-image-5269" srcset="https://i0.wp.com/aderlab.com/wp-content/uploads/Slide7.jpeg?resize=1024%2C576&amp;ssl=1 1024w, https://i0.wp.com/aderlab.com/wp-content/uploads/Slide7.jpeg?resize=300%2C169&amp;ssl=1 300w, https://i0.wp.com/aderlab.com/wp-content/uploads/Slide7.jpeg?resize=768%2C432&amp;ssl=1 768w, https://i0.wp.com/aderlab.com/wp-content/uploads/Slide7.jpeg?resize=1536%2C864&amp;ssl=1 1536w, https://i0.wp.com/aderlab.com/wp-content/uploads/Slide7.jpeg?w=1801&amp;ssl=1 1801w, https://i0.wp.com/aderlab.com/wp-content/uploads/Slide7.jpeg?w=1416&amp;ssl=1 1416w" sizes="auto, (max-width: 708px) 100vw, 708px" /></a></figure>



<p class="">步驟3：套用計算欄位「預估毛利額」到報表<br>把含有參數的計算欄位「預估毛利額」拉到報表對應位置。</p>



<figure class="wp-block-image size-large"><a href="https://i0.wp.com/aderlab.com/wp-content/uploads/Slide8.jpeg?ssl=1"><img data-recalc-dims="1" loading="lazy" decoding="async" width="708" height="398" src="https://i0.wp.com/aderlab.com/wp-content/uploads/Slide8.jpeg?resize=708%2C398&#038;ssl=1" alt="" class="wp-image-5285" srcset="https://i0.wp.com/aderlab.com/wp-content/uploads/Slide8.jpeg?resize=1024%2C576&amp;ssl=1 1024w, https://i0.wp.com/aderlab.com/wp-content/uploads/Slide8.jpeg?resize=300%2C169&amp;ssl=1 300w, https://i0.wp.com/aderlab.com/wp-content/uploads/Slide8.jpeg?resize=768%2C432&amp;ssl=1 768w, https://i0.wp.com/aderlab.com/wp-content/uploads/Slide8.jpeg?resize=1536%2C864&amp;ssl=1 1536w, https://i0.wp.com/aderlab.com/wp-content/uploads/Slide8.jpeg?w=1801&amp;ssl=1 1801w, https://i0.wp.com/aderlab.com/wp-content/uploads/Slide8.jpeg?w=1416&amp;ssl=1 1416w" sizes="auto, (max-width: 708px) 100vw, 708px" /></a></figure>



<p class="">接著，在我們右邊更動「毛利率範圍」的數值時，你就會發現「預估毛利額」這個指標就會依照我們拉動的毛利率範圍數值變動，參數設定到這個步驟就完成了！</p>



<figure class="wp-block-video"><video height="1484" style="aspect-ratio: 2454 / 1484;" width="2454" controls src="https://aderlab.com/wp-content/uploads/parameter_dynamic_column.mov"></video></figure>



<h4 class="wp-block-heading">情境2：動態挑選資料呈現筆數</h4>



<p class="">第二種情境我們可以應用在彈性調整資料筆數，可以透過參數與集合兩個功能做到。我們用個簡單的案例來說明設計做法，例如：我們希望讓使用者可以自行輸入想要呈現的資料筆數，依照銷售額金額大到小排序，在輸入10時，就呈現銷售額前10名的商品，輸入50，就呈現銷售額最高的前50個商品，以此類推。</p>



<p class="">步驟1：建立 Top N 參數<br>挑選前幾名的商品，照理說商品都會是一個一個，所以在資料類型的地方我選擇「整數」，接著，我不限制使用者輸入的數字大小，所以我在下方「允許值」的地方設定「全部」，代表我不限制數字範圍，使用者可以透過輸入來調整數字大小。</p>



<figure class="wp-block-image size-large"><a href="https://i0.wp.com/aderlab.com/wp-content/uploads/Slide17.jpeg?ssl=1"><img data-recalc-dims="1" loading="lazy" decoding="async" width="708" height="398" src="https://i0.wp.com/aderlab.com/wp-content/uploads/Slide17.jpeg?resize=708%2C398&#038;ssl=1" alt="" class="wp-image-5287" srcset="https://i0.wp.com/aderlab.com/wp-content/uploads/Slide17.jpeg?resize=1024%2C576&amp;ssl=1 1024w, https://i0.wp.com/aderlab.com/wp-content/uploads/Slide17.jpeg?resize=300%2C169&amp;ssl=1 300w, https://i0.wp.com/aderlab.com/wp-content/uploads/Slide17.jpeg?resize=768%2C432&amp;ssl=1 768w, https://i0.wp.com/aderlab.com/wp-content/uploads/Slide17.jpeg?resize=1536%2C864&amp;ssl=1 1536w, https://i0.wp.com/aderlab.com/wp-content/uploads/Slide17.jpeg?w=1801&amp;ssl=1 1801w, https://i0.wp.com/aderlab.com/wp-content/uploads/Slide17.jpeg?w=1416&amp;ssl=1 1416w" sizes="auto, (max-width: 708px) 100vw, 708px" /></a></figure>



<p class="">步驟2：建立維度集合<br>這邊要注意的是，當你要設定集合時，記得要選對「維度」，什麼意思呢？意思是，當報表要看的是產品名稱的前幾名，你就必須找到產品名稱這個維度，在這個維度按右鍵，才會出現「集合」建立的選項，最後建立集合時也才能正確套用。</p>



<p class="">如果你選到指標，你會發現右鍵找不到集合的選項，而如果選到不吻合報表欄或列放置的指標的話，也會沒辦法在最後套用篩選的時候發揮作用（和建立參數和計算欄位的建立方式很不一樣，是設定過程特別需要注意的小細節）</p>



<figure class="wp-block-image size-large is-resized"><a href="https://i0.wp.com/aderlab.com/wp-content/uploads/Slide18.jpeg?ssl=1"><img data-recalc-dims="1" loading="lazy" decoding="async" width="708" height="398" src="https://i0.wp.com/aderlab.com/wp-content/uploads/Slide18.jpeg?resize=708%2C398&#038;ssl=1" alt="" class="wp-image-5288" style="aspect-ratio:1.7778874629812438;width:840px;height:auto" srcset="https://i0.wp.com/aderlab.com/wp-content/uploads/Slide18.jpeg?resize=1024%2C576&amp;ssl=1 1024w, https://i0.wp.com/aderlab.com/wp-content/uploads/Slide18.jpeg?resize=300%2C169&amp;ssl=1 300w, https://i0.wp.com/aderlab.com/wp-content/uploads/Slide18.jpeg?resize=768%2C432&amp;ssl=1 768w, https://i0.wp.com/aderlab.com/wp-content/uploads/Slide18.jpeg?resize=1536%2C864&amp;ssl=1 1536w, https://i0.wp.com/aderlab.com/wp-content/uploads/Slide18.jpeg?w=1801&amp;ssl=1 1801w, https://i0.wp.com/aderlab.com/wp-content/uploads/Slide18.jpeg?w=1416&amp;ssl=1 1416w" sizes="auto, (max-width: 708px) 100vw, 708px" /></a></figure>



<p class="">進入建立集合的設定畫面，可以點選「頂端」，選擇「按欄位」，後面的下拉選單選擇我們剛剛建立的參數「Top N」，依據「銷售額(本月)」就可以了。</p>



<p class="">上面這串設定的意思是，我希望依照「銷售額(本月)」的數值，從頂端（也就是從最大）開始篩選想要呈現的資料列數，你當然可以在這邊輸入一個固定值，但是因為這個示範案例是想動態調整呈現的資料筆數嘛，所以啊，這邊選我們上一步驟設定好的參數「Top N」，就可以讓Top N數字變動時，也一併影響到集合內的資料筆數。</p>



<figure class="wp-block-image size-large"><a href="https://i0.wp.com/aderlab.com/wp-content/uploads/Slide19.jpeg?ssl=1"><img data-recalc-dims="1" loading="lazy" decoding="async" width="708" height="398" src="https://i0.wp.com/aderlab.com/wp-content/uploads/Slide19.jpeg?resize=708%2C398&#038;ssl=1" alt="" class="wp-image-5289" srcset="https://i0.wp.com/aderlab.com/wp-content/uploads/Slide19.jpeg?resize=1024%2C576&amp;ssl=1 1024w, https://i0.wp.com/aderlab.com/wp-content/uploads/Slide19.jpeg?resize=300%2C169&amp;ssl=1 300w, https://i0.wp.com/aderlab.com/wp-content/uploads/Slide19.jpeg?resize=768%2C432&amp;ssl=1 768w, https://i0.wp.com/aderlab.com/wp-content/uploads/Slide19.jpeg?resize=1536%2C864&amp;ssl=1 1536w, https://i0.wp.com/aderlab.com/wp-content/uploads/Slide19.jpeg?w=1801&amp;ssl=1 1801w, https://i0.wp.com/aderlab.com/wp-content/uploads/Slide19.jpeg?w=1416&amp;ssl=1 1416w" sizes="auto, (max-width: 708px) 100vw, 708px" /></a></figure>



<p class="">步驟3：把集合放到篩選條件<br>集合的概念是，放到篩選後就會只篩選出在符合集合內條件的資料，還記得我們上一步驟設定的條件嗎？沒錯，就是篩選前N名銷售額最高的產品出來，而參數的預設值是10，所以套用後，就會剩下前10筆的產品資料。</p>



<figure class="wp-block-image size-large"><a href="https://i0.wp.com/aderlab.com/wp-content/uploads/Slide20.jpeg?ssl=1"><img data-recalc-dims="1" loading="lazy" decoding="async" width="708" height="398" src="https://i0.wp.com/aderlab.com/wp-content/uploads/Slide20.jpeg?resize=708%2C398&#038;ssl=1" alt="" class="wp-image-5290" srcset="https://i0.wp.com/aderlab.com/wp-content/uploads/Slide20.jpeg?resize=1024%2C576&amp;ssl=1 1024w, https://i0.wp.com/aderlab.com/wp-content/uploads/Slide20.jpeg?resize=300%2C169&amp;ssl=1 300w, https://i0.wp.com/aderlab.com/wp-content/uploads/Slide20.jpeg?resize=768%2C432&amp;ssl=1 768w, https://i0.wp.com/aderlab.com/wp-content/uploads/Slide20.jpeg?resize=1536%2C864&amp;ssl=1 1536w, https://i0.wp.com/aderlab.com/wp-content/uploads/Slide20.jpeg?w=1801&amp;ssl=1 1801w, https://i0.wp.com/aderlab.com/wp-content/uploads/Slide20.jpeg?w=1416&amp;ssl=1 1416w" sizes="auto, (max-width: 708px) 100vw, 708px" /></a></figure>



<p class="">最後，隨著你變動右側的Top N數值，你就會看到報表的資料筆數隨之會變化，到這個步驟參數就成功建立好了（如下所示）！</p>



<figure class="wp-block-video"><video height="1484" style="aspect-ratio: 2454 / 1484;" width="2454" controls src="https://aderlab.com/wp-content/uploads/Parameter_top.mov"></video></figure>



<h4 class="wp-block-heading">情境3：動態更換資料欄位</h4>



<p class="">如果我想要提供讓使用者可以在銷售額、銷售量、利潤、訂單與客戶數，這5個指標自由切換，在Tableau該怎麼做呢？這時候我們可以用參數來動態更換欄位內容。</p>



<p class="">步驟1：建立參數<br>建立一個資料類型為字串，允許值選擇「清單」，分別輸入為：「銷售額」、「銷售量」、「利潤」、「訂單」與「客戶數」的參數清單，設定內容如下。</p>



<figure class="wp-block-image size-large"><a href="https://i0.wp.com/aderlab.com/wp-content/uploads/setup-parameter-1.png?ssl=1"><img data-recalc-dims="1" loading="lazy" decoding="async" width="708" height="398" src="https://i0.wp.com/aderlab.com/wp-content/uploads/setup-parameter-1.png?resize=708%2C398&#038;ssl=1" alt="" class="wp-image-5149" srcset="https://i0.wp.com/aderlab.com/wp-content/uploads/setup-parameter-1.png?resize=1024%2C576&amp;ssl=1 1024w, https://i0.wp.com/aderlab.com/wp-content/uploads/setup-parameter-1.png?resize=300%2C169&amp;ssl=1 300w, https://i0.wp.com/aderlab.com/wp-content/uploads/setup-parameter-1.png?resize=768%2C432&amp;ssl=1 768w, https://i0.wp.com/aderlab.com/wp-content/uploads/setup-parameter-1.png?resize=1536%2C864&amp;ssl=1 1536w, https://i0.wp.com/aderlab.com/wp-content/uploads/setup-parameter-1.png?w=1801&amp;ssl=1 1801w, https://i0.wp.com/aderlab.com/wp-content/uploads/setup-parameter-1.png?w=1416&amp;ssl=1 1416w" sizes="auto, (max-width: 708px) 100vw, 708px" /></a></figure>



<p class="">步驟2：透過計算欄位比對參數，設定每個參數對應的數據指標<br>當我選到參數清單裡的「銷售額」時，我希望可以對應到「Sales」這個指標，而當我切換到「客戶數」時，我就預期可以對應到「Customer」這個指標，以此類推。接著，我們來設定「計算欄位的內容」，讓參數清單可以與計算欄位產生連結，讓我們之後在切換「指標切換器」的這個參數時，就影響到欄位 「指標切換器」的計算欄位。</p>



<figure class="wp-block-image size-large"><a href="https://i0.wp.com/aderlab.com/wp-content/uploads/setup-calculation-1.png?ssl=1"><img data-recalc-dims="1" loading="lazy" decoding="async" width="708" height="398" src="https://i0.wp.com/aderlab.com/wp-content/uploads/setup-calculation-1.png?resize=708%2C398&#038;ssl=1" alt="" class="wp-image-5150" srcset="https://i0.wp.com/aderlab.com/wp-content/uploads/setup-calculation-1.png?resize=1024%2C576&amp;ssl=1 1024w, https://i0.wp.com/aderlab.com/wp-content/uploads/setup-calculation-1.png?resize=300%2C169&amp;ssl=1 300w, https://i0.wp.com/aderlab.com/wp-content/uploads/setup-calculation-1.png?resize=768%2C432&amp;ssl=1 768w, https://i0.wp.com/aderlab.com/wp-content/uploads/setup-calculation-1.png?resize=1536%2C864&amp;ssl=1 1536w, https://i0.wp.com/aderlab.com/wp-content/uploads/setup-calculation-1.png?w=1801&amp;ssl=1 1801w, https://i0.wp.com/aderlab.com/wp-content/uploads/setup-calculation-1.png?w=1416&amp;ssl=1 1416w" sizes="auto, (max-width: 708px) 100vw, 708px" /></a></figure>



<p class="">計算欄位公式：</p>



<pre class="wp-block-code"><code>if &#91;參數].&#91;指標切換器] = '銷售額' then &#91;銷售額 (本月)]<br>elseif &#91;參數].&#91;指標切換器] = '銷售量' then &#91;數量 (本月)]<br>elseif &#91;參數].&#91;指標切換器] = '利潤' then &#91;利潤 (本月)]<br>elseif &#91;參數].&#91;指標切換器] = '訂單' then &#91;訂單數 (本月)]<br>elseif &#91;參數].&#91;指標切換器] = '客戶數' then &#91;客戶數 (本月)]<br>end</code></pre>



<p class="">這段公式的意思是，當參數選到「銷售額」時，欄位就呈現「銷售額 (本月)」這個數據指標；當參數選到「銷售量」時，欄位就呈現「數量 (本月)」這個數據指標，以此類推，這樣就完成了參數與欄位的連結。</p>



<figure class="wp-block-image size-large"><a href="https://i0.wp.com/aderlab.com/wp-content/uploads/setup-calculation.png?ssl=1"><img data-recalc-dims="1" loading="lazy" decoding="async" width="708" height="398" src="https://i0.wp.com/aderlab.com/wp-content/uploads/setup-calculation.png?resize=708%2C398&#038;ssl=1" alt="" class="wp-image-5151" srcset="https://i0.wp.com/aderlab.com/wp-content/uploads/setup-calculation.png?resize=1024%2C576&amp;ssl=1 1024w, https://i0.wp.com/aderlab.com/wp-content/uploads/setup-calculation.png?resize=300%2C169&amp;ssl=1 300w, https://i0.wp.com/aderlab.com/wp-content/uploads/setup-calculation.png?resize=768%2C432&amp;ssl=1 768w, https://i0.wp.com/aderlab.com/wp-content/uploads/setup-calculation.png?resize=1536%2C864&amp;ssl=1 1536w, https://i0.wp.com/aderlab.com/wp-content/uploads/setup-calculation.png?w=1801&amp;ssl=1 1801w, https://i0.wp.com/aderlab.com/wp-content/uploads/setup-calculation.png?w=1416&amp;ssl=1 1416w" sizes="auto, (max-width: 708px) 100vw, 708px" /></a></figure>



<p class="">3. 把對應的欄位拉到欄與列<br>把我們做好的「指標切換器」計算欄位拉到對應的「欄」，並且於圖表中顯示數值。接著因為我們想要看到各個城市的各個數據指標，所以接著需要再把「City」的維度拉到「列」，就初步完成了城市的銷售額長條圖。</p>



<figure class="wp-block-image size-large"><a href="https://i0.wp.com/aderlab.com/wp-content/uploads/Presentation2.png?ssl=1"><img data-recalc-dims="1" loading="lazy" decoding="async" width="708" height="398" src="https://i0.wp.com/aderlab.com/wp-content/uploads/Presentation2.png?resize=708%2C398&#038;ssl=1" alt="" class="wp-image-5298" srcset="https://i0.wp.com/aderlab.com/wp-content/uploads/Presentation2.png?resize=1024%2C576&amp;ssl=1 1024w, https://i0.wp.com/aderlab.com/wp-content/uploads/Presentation2.png?resize=300%2C169&amp;ssl=1 300w, https://i0.wp.com/aderlab.com/wp-content/uploads/Presentation2.png?resize=768%2C432&amp;ssl=1 768w, https://i0.wp.com/aderlab.com/wp-content/uploads/Presentation2.png?resize=1536%2C864&amp;ssl=1 1536w, https://i0.wp.com/aderlab.com/wp-content/uploads/Presentation2.png?w=1801&amp;ssl=1 1801w, https://i0.wp.com/aderlab.com/wp-content/uploads/Presentation2.png?w=1416&amp;ssl=1 1416w" sizes="auto, (max-width: 708px) 100vw, 708px" /></a></figure>



<p class="">設定完之後，我們就可以做出如下的結果，當「指標切換器」的參數字串更改時，長條圖的指標與數值都會跟著更改。</p>



<figure class="wp-block-video"><video height="1484" style="aspect-ratio: 2454 / 1484;" width="2454" autoplay controls src="https://aderlab.com/wp-content/uploads/parameter_change_metrics.mov"></video></figure>



<p class="">從這三種使用情境你有發現步驟相似性嗎？沒錯，所有的步驟都是先建立參數，然後必須透過「建立計算欄位」讓參數與欄位產生關聯，可能是計算關聯，可能是符合某個情境才帶出數值，也可能是再搭配其他的功能，例如集合設定，但不論是哪一種，要提醒的是，參數不是建立完就沒事了，要讓參數發揮功能，就必須接著設定「參數要應用的地方」，才能順利的讓參數成為我們設計報表的好幫手。</p>



<h3 class="wp-block-heading">使用場景二：取代篩選器</h3>



<p class="">我個人比較少拿參數來取代篩選器使用，因為「超級麻煩」，特別是你想要挑選的指標不只一個的時候，就需要針對每一個指標都新建立一個計算欄位，再將這些經過計算的欄位套用到報表。舉個例子，如果我們想用參數建立年月份篩選，你需要先建立年份月份的篩選器，接著再建立每個欄位套用年月份參數的計算欄位，詳細步驟如下：</p>



<p class="">步驟1：建立年月份參數</p>



<figure class="wp-block-image size-large"><a href="https://i0.wp.com/aderlab.com/wp-content/uploads/Slide9.jpeg?ssl=1"><img data-recalc-dims="1" loading="lazy" decoding="async" width="708" height="398" src="https://i0.wp.com/aderlab.com/wp-content/uploads/Slide9.jpeg?resize=708%2C398&#038;ssl=1" alt="" class="wp-image-5270" srcset="https://i0.wp.com/aderlab.com/wp-content/uploads/Slide9.jpeg?resize=1024%2C576&amp;ssl=1 1024w, https://i0.wp.com/aderlab.com/wp-content/uploads/Slide9.jpeg?resize=300%2C169&amp;ssl=1 300w, https://i0.wp.com/aderlab.com/wp-content/uploads/Slide9.jpeg?resize=768%2C432&amp;ssl=1 768w, https://i0.wp.com/aderlab.com/wp-content/uploads/Slide9.jpeg?resize=1536%2C864&amp;ssl=1 1536w, https://i0.wp.com/aderlab.com/wp-content/uploads/Slide9.jpeg?w=1801&amp;ssl=1 1801w, https://i0.wp.com/aderlab.com/wp-content/uploads/Slide9.jpeg?w=1416&amp;ssl=1 1416w" sizes="auto, (max-width: 708px) 100vw, 708px" /></a></figure>



<figure class="wp-block-image size-large"><a href="https://i0.wp.com/aderlab.com/wp-content/uploads/Slide10.jpeg?ssl=1"><img data-recalc-dims="1" loading="lazy" decoding="async" width="708" height="398" src="https://i0.wp.com/aderlab.com/wp-content/uploads/Slide10.jpeg?resize=708%2C398&#038;ssl=1" alt="" class="wp-image-5272" srcset="https://i0.wp.com/aderlab.com/wp-content/uploads/Slide10.jpeg?resize=1024%2C576&amp;ssl=1 1024w, https://i0.wp.com/aderlab.com/wp-content/uploads/Slide10.jpeg?resize=300%2C169&amp;ssl=1 300w, https://i0.wp.com/aderlab.com/wp-content/uploads/Slide10.jpeg?resize=768%2C432&amp;ssl=1 768w, https://i0.wp.com/aderlab.com/wp-content/uploads/Slide10.jpeg?resize=1536%2C864&amp;ssl=1 1536w, https://i0.wp.com/aderlab.com/wp-content/uploads/Slide10.jpeg?w=1801&amp;ssl=1 1801w, https://i0.wp.com/aderlab.com/wp-content/uploads/Slide10.jpeg?w=1416&amp;ssl=1 1416w" sizes="auto, (max-width: 708px) 100vw, 708px" /></a></figure>



<p class="">步驟2：建立參數對應的計算欄位</p>



<p class="">看你需要使用幾個指標就需要建立幾個，這邊先示範銷售額與銷售量的計算欄位，公式如下：<br>銷售額公式：</p>



<pre class="wp-block-code"><code>SUM(IF &#91;年份] = &#91;篩選年份]
AND &#91;月份] = &#91;篩選月份] THEN &#91;Sales] ELSE NULL END)</code></pre>



<p class="">銷售量公式： </p>



<pre class="wp-block-code"><code>SUM(IF &#91;年份] = &#91;篩選年份]
AND &#91;月份] = &#91;篩選月份] THEN &#91;Quantity] ELSE NULL END</code></pre>



<figure class="wp-block-image size-large"><a href="https://i0.wp.com/aderlab.com/wp-content/uploads/Slide11.jpeg?ssl=1"><img data-recalc-dims="1" loading="lazy" decoding="async" width="708" height="398" src="https://i0.wp.com/aderlab.com/wp-content/uploads/Slide11.jpeg?resize=708%2C398&#038;ssl=1" alt="" class="wp-image-5273" srcset="https://i0.wp.com/aderlab.com/wp-content/uploads/Slide11.jpeg?resize=1024%2C576&amp;ssl=1 1024w, https://i0.wp.com/aderlab.com/wp-content/uploads/Slide11.jpeg?resize=300%2C169&amp;ssl=1 300w, https://i0.wp.com/aderlab.com/wp-content/uploads/Slide11.jpeg?resize=768%2C432&amp;ssl=1 768w, https://i0.wp.com/aderlab.com/wp-content/uploads/Slide11.jpeg?resize=1536%2C864&amp;ssl=1 1536w, https://i0.wp.com/aderlab.com/wp-content/uploads/Slide11.jpeg?w=1801&amp;ssl=1 1801w, https://i0.wp.com/aderlab.com/wp-content/uploads/Slide11.jpeg?w=1416&amp;ssl=1 1416w" sizes="auto, (max-width: 708px) 100vw, 708px" /></a></figure>



<figure class="wp-block-image size-large"><a href="https://i0.wp.com/aderlab.com/wp-content/uploads/Slide12.jpeg?ssl=1"><img data-recalc-dims="1" loading="lazy" decoding="async" width="708" height="398" src="https://i0.wp.com/aderlab.com/wp-content/uploads/Slide12.jpeg?resize=708%2C398&#038;ssl=1" alt="" class="wp-image-5274" srcset="https://i0.wp.com/aderlab.com/wp-content/uploads/Slide12.jpeg?resize=1024%2C576&amp;ssl=1 1024w, https://i0.wp.com/aderlab.com/wp-content/uploads/Slide12.jpeg?resize=300%2C169&amp;ssl=1 300w, https://i0.wp.com/aderlab.com/wp-content/uploads/Slide12.jpeg?resize=768%2C432&amp;ssl=1 768w, https://i0.wp.com/aderlab.com/wp-content/uploads/Slide12.jpeg?resize=1536%2C864&amp;ssl=1 1536w, https://i0.wp.com/aderlab.com/wp-content/uploads/Slide12.jpeg?w=1801&amp;ssl=1 1801w, https://i0.wp.com/aderlab.com/wp-content/uploads/Slide12.jpeg?w=1416&amp;ssl=1 1416w" sizes="auto, (max-width: 708px) 100vw, 708px" /></a></figure>



<p class="">建立完上述的計算欄位之後，我們把對應的計算欄位放到報表中，就可以在更動「篩選年份」或「篩選月份」的時候，讓報表的銷售額與銷售量隨之更動到對應的年月份的數值了。</p>



<figure class="wp-block-video"><video height="1484" style="aspect-ratio: 2454 / 1484;" width="2454" controls src="https://aderlab.com/wp-content/uploads/Parameter_filter.mov"></video></figure>



<p class="">不過啊，使用參數當作篩選器的做法我個人不太喜歡，原因是因為當你要使用的指標愈多，你就需要設定愈多的計算欄位，所以如果你要使用5個指標，那就要把5個指標分別建立5個計算欄位，我個人是覺得有點多餘，不如直接使用篩選器來得快速方便。</p>



<h3 class="wp-block-heading">使用場景三：圖表參考線</h3>



<p class="">在使用柱狀圖跟折線圖的時候，我們有時候會想要設定圖表參考線，例如以平均值來設定參考線，看哪些月份低於平均值，哪些月份又高於平均值。</p>



<p class="">除了用平均值、最大值、最小值等比較數值外，如果你想要依據公司現階段的目標來設定參考線可不可以呢？當然可以，如果你需要動態調整，那麼用參數來取代固定的參考線就是一個好的替代方案。</p>



<figure class="wp-block-image size-large"><a href="https://i0.wp.com/aderlab.com/wp-content/uploads/Slide14.jpeg?ssl=1"><img data-recalc-dims="1" loading="lazy" decoding="async" width="708" height="398" src="https://i0.wp.com/aderlab.com/wp-content/uploads/Slide14.jpeg?resize=708%2C398&#038;ssl=1" alt="" class="wp-image-5277" srcset="https://i0.wp.com/aderlab.com/wp-content/uploads/Slide14.jpeg?resize=1024%2C576&amp;ssl=1 1024w, https://i0.wp.com/aderlab.com/wp-content/uploads/Slide14.jpeg?resize=300%2C169&amp;ssl=1 300w, https://i0.wp.com/aderlab.com/wp-content/uploads/Slide14.jpeg?resize=768%2C432&amp;ssl=1 768w, https://i0.wp.com/aderlab.com/wp-content/uploads/Slide14.jpeg?resize=1536%2C864&amp;ssl=1 1536w, https://i0.wp.com/aderlab.com/wp-content/uploads/Slide14.jpeg?w=1801&amp;ssl=1 1801w, https://i0.wp.com/aderlab.com/wp-content/uploads/Slide14.jpeg?w=1416&amp;ssl=1 1416w" sizes="auto, (max-width: 708px) 100vw, 708px" /></a></figure>



<p class="">步驟1：建立參數</p>



<figure class="wp-block-image size-large is-resized"><a href="https://i0.wp.com/aderlab.com/wp-content/uploads/Slide15.jpeg?ssl=1"><img data-recalc-dims="1" loading="lazy" decoding="async" width="708" height="398" src="https://i0.wp.com/aderlab.com/wp-content/uploads/Slide15.jpeg?resize=708%2C398&#038;ssl=1" alt="" class="wp-image-5278" style="aspect-ratio:1.7778874629812438;width:840px;height:auto" srcset="https://i0.wp.com/aderlab.com/wp-content/uploads/Slide15.jpeg?resize=1024%2C576&amp;ssl=1 1024w, https://i0.wp.com/aderlab.com/wp-content/uploads/Slide15.jpeg?resize=300%2C169&amp;ssl=1 300w, https://i0.wp.com/aderlab.com/wp-content/uploads/Slide15.jpeg?resize=768%2C432&amp;ssl=1 768w, https://i0.wp.com/aderlab.com/wp-content/uploads/Slide15.jpeg?resize=1536%2C864&amp;ssl=1 1536w, https://i0.wp.com/aderlab.com/wp-content/uploads/Slide15.jpeg?w=1801&amp;ssl=1 1801w, https://i0.wp.com/aderlab.com/wp-content/uploads/Slide15.jpeg?w=1416&amp;ssl=1 1416w" sizes="auto, (max-width: 708px) 100vw, 708px" /></a></figure>



<p class="">步驟2：打開圖表參考線，用參數取代固定參考線</p>



<p class="">在圖表的軸點選右鍵，就可以看到「新增參考線」的選項</p>



<figure class="wp-block-image size-large"><a href="https://i0.wp.com/aderlab.com/wp-content/uploads/Slide13.jpeg?ssl=1"><img data-recalc-dims="1" loading="lazy" decoding="async" width="708" height="398" src="https://i0.wp.com/aderlab.com/wp-content/uploads/Slide13.jpeg?resize=708%2C398&#038;ssl=1" alt="" class="wp-image-5275" srcset="https://i0.wp.com/aderlab.com/wp-content/uploads/Slide13.jpeg?resize=1024%2C576&amp;ssl=1 1024w, https://i0.wp.com/aderlab.com/wp-content/uploads/Slide13.jpeg?resize=300%2C169&amp;ssl=1 300w, https://i0.wp.com/aderlab.com/wp-content/uploads/Slide13.jpeg?resize=768%2C432&amp;ssl=1 768w, https://i0.wp.com/aderlab.com/wp-content/uploads/Slide13.jpeg?resize=1536%2C864&amp;ssl=1 1536w, https://i0.wp.com/aderlab.com/wp-content/uploads/Slide13.jpeg?w=1801&amp;ssl=1 1801w, https://i0.wp.com/aderlab.com/wp-content/uploads/Slide13.jpeg?w=1416&amp;ssl=1 1416w" sizes="auto, (max-width: 708px) 100vw, 708px" /></a></figure>



<p class="">在參考線的設定畫面，「值」的欄位改為選擇上個步驟我們建立好的「圖表參考線」。</p>



<figure class="wp-block-image size-large"><a href="https://i0.wp.com/aderlab.com/wp-content/uploads/Slide16.jpeg?ssl=1"><img data-recalc-dims="1" loading="lazy" decoding="async" width="708" height="398" src="https://i0.wp.com/aderlab.com/wp-content/uploads/Slide16.jpeg?resize=708%2C398&#038;ssl=1" alt="" class="wp-image-5279" srcset="https://i0.wp.com/aderlab.com/wp-content/uploads/Slide16.jpeg?resize=1024%2C576&amp;ssl=1 1024w, https://i0.wp.com/aderlab.com/wp-content/uploads/Slide16.jpeg?resize=300%2C169&amp;ssl=1 300w, https://i0.wp.com/aderlab.com/wp-content/uploads/Slide16.jpeg?resize=768%2C432&amp;ssl=1 768w, https://i0.wp.com/aderlab.com/wp-content/uploads/Slide16.jpeg?resize=1536%2C864&amp;ssl=1 1536w, https://i0.wp.com/aderlab.com/wp-content/uploads/Slide16.jpeg?w=1801&amp;ssl=1 1801w, https://i0.wp.com/aderlab.com/wp-content/uploads/Slide16.jpeg?w=1416&amp;ssl=1 1416w" sizes="auto, (max-width: 708px) 100vw, 708px" /></a></figure>



<p class="">完成上述步驟之後，你就可以呈現如下的長條圖參考線效果了。</p>



<figure class="wp-block-video"><video height="1484" style="aspect-ratio: 2454 / 1484;" width="2454" controls src="https://aderlab.com/wp-content/uploads/parameter_reference_line.mov"></video></figure>



<p class="">總結來說，當你需要可以「動態」改變日期、數字或是字串的時候，這時候你優先要想到的好幫手就是「參數」設定，只要讓參數和欄位產生連結，我們就可以自由調整參數值，讓報表呈現我們想要呈現的結果，那關於 Tableau 參數就分享到這裡啦，下篇文章見～</p>



<p class="has-text-align-right">Sharon</p>



<hr class="is-style-wide wp-block-separator has-alpha-channel-opacity"/>



<p class="has-medium-font-size"><strong>Buy me a coffee&nbsp; 用行動支持我的內容創作</strong></p>



<p class=""><em>如果我的文章對你有幫助，歡迎用行動支持我的內容創作，小額贊助請我喝咖啡、留言或是寄信來跟我分享你的收穫，都會讓我持續有動力分享更多內容唷～</em></p>



<div class="wp-block-buttons is-layout-flex wp-block-buttons-is-layout-flex">
<div class="aligncenter is-style-fill wp-block-button"><a class="wp-block-button__link has-black-color has-luminous-vivid-amber-background-color has-text-color has-background wp-element-button" href="https://www.buymeacoffee.com/aderlabsharon" target="_blank" rel="noreferrer noopener">以小額贊助支持Sharon</a></div>
</div>
<p>這篇文章 <a href="https://aderlab.com/data-analytics/tableau-parameter/">【Tableau教學】一篇了解 Tableau 參數是什麼！詳細定義、設定與應用場景說明</a> 最早出現於 <a href="https://aderlab.com">Sharon Lab∣雪倫實驗室</a>。</p>
]]></content:encoded>
					
		
		<enclosure url="https://aderlab.com/wp-content/uploads/parameter_dynamic_column.mov" length="5159721" type="video/quicktime" />
<enclosure url="https://aderlab.com/wp-content/uploads/Parameter_top.mov" length="6942494" type="video/quicktime" />
<enclosure url="https://aderlab.com/wp-content/uploads/parameter_change_metrics.mov" length="1715623" type="video/quicktime" />
<enclosure url="https://aderlab.com/wp-content/uploads/Parameter_filter.mov" length="6306894" type="video/quicktime" />
<enclosure url="https://aderlab.com/wp-content/uploads/parameter_reference_line.mov" length="4272995" type="video/quicktime" />

		<post-id xmlns="com-wordpress:feed-additions:1">5265</post-id>	</item>
		<item>
		<title>【Tableau 教學】給非數據人員的 Tableau 使用指南</title>
		<link>https://aderlab.com/data-analytics/tableau-useful-guideline/</link>
		
		<dc:creator><![CDATA[Sharon]]></dc:creator>
		<pubDate>Sat, 30 Sep 2023 01:00:00 +0000</pubDate>
				<category><![CDATA[Tableau]]></category>
		<category><![CDATA[數據分析]]></category>
		<guid isPermaLink="false">https://aderlab.com/?p=5245</guid>

					<description><![CDATA[<p>這一篇寫給非數據分析師的工作者，你在工作上可能需要大量的使用 Tableau 報表，是 Tableau 報表的使用者，而不是報表製作的設計者，如何讓你在每次開報&#8230;</p>
<p><a href="https://aderlab.com/data-analytics/tableau-useful-guideline/" class="btn-continue">繼續閱讀<span class="arrow-continue">&#8594;</span></a></p>
<p>這篇文章 <a href="https://aderlab.com/data-analytics/tableau-useful-guideline/">【Tableau 教學】給非數據人員的 Tableau 使用指南</a> 最早出現於 <a href="https://aderlab.com">Sharon Lab∣雪倫實驗室</a>。</p>
]]></description>
										<content:encoded><![CDATA[
<p class="">這一篇寫給非數據分析師的工作者，你在工作上可能需要大量的使用 Tableau 報表，是 Tableau 報表的使用者，而不是報表製作的設計者，如何讓你在每次開報表的時候更省時省力？如何可以在解讀報表使用報表的時候更上手？如何正確的下載資料？</p>



<p class="">這一篇將分享：自訂開始的預設篩選條件、資料排序與展開以及資料下載的步驟分享，如果你在使用 Tableau報表時總是覺得頭痛，這一篇希望幫助你，讓你的報表日常更順利，更方便，那就開始囉！</p>



<h2 class="wp-block-heading">非數據人員必知的 5 個 Tableau 使用指南</h2>



<h3 class="wp-block-heading">打開報表總是轉圈圈？自訂檢視可以幫上忙</h3>



<p class="">你曾經遇過打開 Tableau 報表總是轉圈圈，轉半天資料都還沒出來的窘境嗎？遇到這種狀況別急著找同事幫忙解問題，只要善用「自訂檢視」功能，包準你下次就能很快速地打開 Tableau 報表！不過在聊聊自訂檢視之前，我們先來了解報表為什麼轉圈圈，其實，最主要的原因就是因為「資料量太大」，所以當原始報表沒有做任何篩選，報表使用的資料源數據量又很大時，就會發生報表需要 Loading很久的問題，這就好像是我們進入線上遊戲，首次進入都需要有個遊戲登入前的 Loading 時間一樣。</p>



<p class="">那麼什麼是自訂檢視呢？顧名思義就是你在第一次開啟報表之後，先篩選好你需要的篩選器，接著我們在儲存這些篩選條件，下次開啟時就可以直接套用這些條件，一來可以藉由篩選器的設定，減少資料源的資料範圍，讓報表的資料量變小，二來，你也可以節省設定篩選器的步驟，也可以避免漏了設定篩選條件，特別適合每天都需要用到Tableau 報表的工作者。那麼怎麼設定自訂檢視呢？</p>



<p class="">打開報表的時候，先設定好篩選條件，接著在報表的右上角有一個「檢視」的按鈕，輸入這個檢視的名稱，接著勾選「<strong>設為我的預設</strong>」，這樣就完成了自訂檢視的設定了，設定完之後，下次再開啟報表時，出現的報表畫面就會依照你設定時篩選的條件呈現了。</p>



<figure class="wp-block-image size-large"><a href="https://i0.wp.com/aderlab.com/wp-content/uploads/custom-view.png?ssl=1"><img data-recalc-dims="1" loading="lazy" decoding="async" width="708" height="365" src="https://i0.wp.com/aderlab.com/wp-content/uploads/custom-view.png?resize=708%2C365&#038;ssl=1" alt="" class="wp-image-5252" srcset="https://i0.wp.com/aderlab.com/wp-content/uploads/custom-view.png?resize=1024%2C528&amp;ssl=1 1024w, https://i0.wp.com/aderlab.com/wp-content/uploads/custom-view.png?resize=300%2C155&amp;ssl=1 300w, https://i0.wp.com/aderlab.com/wp-content/uploads/custom-view.png?resize=768%2C396&amp;ssl=1 768w, https://i0.wp.com/aderlab.com/wp-content/uploads/custom-view.png?resize=1536%2C792&amp;ssl=1 1536w, https://i0.wp.com/aderlab.com/wp-content/uploads/custom-view.png?resize=2048%2C1056&amp;ssl=1 2048w, https://i0.wp.com/aderlab.com/wp-content/uploads/custom-view.png?w=1416&amp;ssl=1 1416w, https://i0.wp.com/aderlab.com/wp-content/uploads/custom-view.png?w=2124&amp;ssl=1 2124w" sizes="auto, (max-width: 708px) 100vw, 708px" /></a></figure>



<h3 class="wp-block-heading">下載再排序好困擾？排序按鈕超方便</h3>



<p class="">如果你有每次都要把 Tableau 報表的資料下載到 Excel，接著再進行資料排序的困擾，那你一定要知道這項 Tableau 不起眼，卻相當實用的小按鈕：資料排序，這個按鈕通常位於資料欄位名稱的右邊，會呈現一個三條線的圖示，就可以讓你把資料依照大排到小、小排到大，如果是想排序維度（也就是非數值的資料），資料則能依照欄位的A-Z名稱或Z-A名稱排序。</p>



<figure class="wp-block-video"><video height="1342" style="aspect-ratio: 1756 / 1342;" width="1756" controls src="https://aderlab.com/wp-content/uploads/sortby.mov"></video></figure>



<h3 class="wp-block-heading">資料維度不夠看？資料階層能讓資料向下展開</h3>



<p class="">常常因為資料維度太少不夠看？圖表日期只顯示到月份，能不能往下展開到每日資料呢？如果報表設計的分析師有做資料階層（Hierarchy）的話，其實你就可以自己操作報表來展開更詳細的資料了！舉例來說，實務上，很多公司的銷售產品很多，所以在大面向的分析角度，通常會先以產品分類，甚至是產品次分類來區分產品銷售的狀況，但是，對於第一線的銷售人員，產品分類可能遠遠不夠，如果你還想看更詳細的「單個產品分類下的每個產品」的銷售狀況怎麼辦？</p>



<p class="">這時候資料階層（Hierarchy）就能幫上忙，如果你的數據分析師有想到這個，那麼你就可以直接使用，如果沒想到，也許你可以跟數據分析師溝通看看，看看能不能加上資料階層（Hierarchy）的功能，你就可以透過按鈕+，自己展開資料，而不需要額外撈資料或是設計報表了。</p>



<p class="">資料要怎麼展開呢？我們可以把滑鼠游標移到資料欄位旁邊，就會出現「+」或「-」的符號，「+」代表向下展開、「-」代表向上收回，如果沒有「-」，就代表這個資料層級已經是設定的最高層級，無法再向上收回了。</p>



<figure class="wp-block-video"><video height="1800" style="aspect-ratio: 2880 / 1800;" width="2880" controls src="https://aderlab.com/wp-content/uploads/Hierarchies_video.mov"></video></figure>



<h3 class="wp-block-heading">CSV、Excel 資料下載差異是什麼？</h3>



<p class="">最後，來談談很多人都會需要的下載技巧，到底該選哪一個選項下載？到底該選 CSV 還是 Excel 下載？下載通常有五種選擇可以挑選：影像、資料、交叉資料表、PDF、PowerPoint、Tableau 工作簿，大部分的下載格式相信大家一眼就能看懂，最容易混淆的則是「資料」以及「交叉資料表」，資料指的是全部的資料源，所以千萬千萬不要下載這個格式，如果你希望資料照著報表樣子匯出，希望套用你在報表設定的篩選器，那麼記得選擇「交叉資料表」。</p>



<figure class="wp-block-image size-large"><a href="https://i0.wp.com/aderlab.com/wp-content/uploads/Download-sample.png?ssl=1"><img data-recalc-dims="1" loading="lazy" decoding="async" width="708" height="340" src="https://i0.wp.com/aderlab.com/wp-content/uploads/Download-sample.png?resize=708%2C340&#038;ssl=1" alt="" class="wp-image-5250" srcset="https://i0.wp.com/aderlab.com/wp-content/uploads/Download-sample.png?resize=1024%2C492&amp;ssl=1 1024w, https://i0.wp.com/aderlab.com/wp-content/uploads/Download-sample.png?resize=300%2C144&amp;ssl=1 300w, https://i0.wp.com/aderlab.com/wp-content/uploads/Download-sample.png?resize=768%2C369&amp;ssl=1 768w, https://i0.wp.com/aderlab.com/wp-content/uploads/Download-sample.png?resize=1536%2C738&amp;ssl=1 1536w, https://i0.wp.com/aderlab.com/wp-content/uploads/Download-sample.png?resize=2048%2C984&amp;ssl=1 2048w, https://i0.wp.com/aderlab.com/wp-content/uploads/Download-sample.png?w=1416&amp;ssl=1 1416w, https://i0.wp.com/aderlab.com/wp-content/uploads/Download-sample.png?w=2124&amp;ssl=1 2124w" sizes="auto, (max-width: 708px) 100vw, 708px" /></a></figure>



<p class="">至於要選擇CSV 還是 Excel 下載呢？你可以往下看看兩者匯出的格式差異。簡單說，Excel匯出的話，當前後筆資料維度相同時，例如都是「產品A」，他會自動的合併兩個儲存格；而CSV則會在兩個儲存格都各自顯示上「產品A」，你可以評估看看兩種格式哪一種更適合你的應用場景。</p>


<div class="wp-block-image">
<figure class="aligncenter size-large"><a href="https://i0.wp.com/aderlab.com/wp-content/uploads/Excel-Sample.png?ssl=1"><img data-recalc-dims="1" loading="lazy" decoding="async" width="708" height="327" src="https://i0.wp.com/aderlab.com/wp-content/uploads/Excel-Sample.png?resize=708%2C327&#038;ssl=1" alt="" class="wp-image-5249" srcset="https://i0.wp.com/aderlab.com/wp-content/uploads/Excel-Sample.png?resize=1024%2C473&amp;ssl=1 1024w, https://i0.wp.com/aderlab.com/wp-content/uploads/Excel-Sample.png?resize=300%2C139&amp;ssl=1 300w, https://i0.wp.com/aderlab.com/wp-content/uploads/Excel-Sample.png?resize=768%2C355&amp;ssl=1 768w, https://i0.wp.com/aderlab.com/wp-content/uploads/Excel-Sample.png?resize=1536%2C709&amp;ssl=1 1536w, https://i0.wp.com/aderlab.com/wp-content/uploads/Excel-Sample.png?w=1572&amp;ssl=1 1572w, https://i0.wp.com/aderlab.com/wp-content/uploads/Excel-Sample.png?w=1416&amp;ssl=1 1416w" sizes="auto, (max-width: 708px) 100vw, 708px" /></a><figcaption class="wp-element-caption">Excel 匯出格式</figcaption></figure>
</div>

<div class="wp-block-image">
<figure class="aligncenter size-large"><a href="https://i0.wp.com/aderlab.com/wp-content/uploads/CSV-Sample.png?ssl=1"><img data-recalc-dims="1" loading="lazy" decoding="async" width="708" height="395" src="https://i0.wp.com/aderlab.com/wp-content/uploads/CSV-Sample.png?resize=708%2C395&#038;ssl=1" alt="" class="wp-image-5248" srcset="https://i0.wp.com/aderlab.com/wp-content/uploads/CSV-Sample.png?resize=1024%2C571&amp;ssl=1 1024w, https://i0.wp.com/aderlab.com/wp-content/uploads/CSV-Sample.png?resize=300%2C167&amp;ssl=1 300w, https://i0.wp.com/aderlab.com/wp-content/uploads/CSV-Sample.png?resize=768%2C428&amp;ssl=1 768w, https://i0.wp.com/aderlab.com/wp-content/uploads/CSV-Sample.png?w=1230&amp;ssl=1 1230w" sizes="auto, (max-width: 708px) 100vw, 708px" /></a><figcaption class="wp-element-caption">CSV匯出格式</figcaption></figure>
</div>


<h3 class="wp-block-heading">總是找不到報表？我的最愛功能能幫上忙</h3>



<p class="">Tableau 也有加到我的最愛的功能，所以如果你有常用的報表，不妨就把這些報表都加到我的最愛，這樣下次要使用報表時就不會苦於找不到報表了。每個報表下方都有一個星星符號，這就是加到我的最愛的設定方式，點選後原本空白的星星會變填滿的星星，這樣就成功了，之後就可以在左放的「Favorite」找到報表囉！</p>



<figure class="wp-block-image size-large"><a href="https://i0.wp.com/aderlab.com/wp-content/uploads/Slide1.jpeg?ssl=1"><img data-recalc-dims="1" loading="lazy" decoding="async" width="708" height="398" src="https://i0.wp.com/aderlab.com/wp-content/uploads/Slide1.jpeg?resize=708%2C398&#038;ssl=1" alt="" class="wp-image-5351" srcset="https://i0.wp.com/aderlab.com/wp-content/uploads/Slide1.jpeg?resize=1024%2C576&amp;ssl=1 1024w, https://i0.wp.com/aderlab.com/wp-content/uploads/Slide1.jpeg?resize=300%2C169&amp;ssl=1 300w, https://i0.wp.com/aderlab.com/wp-content/uploads/Slide1.jpeg?resize=768%2C432&amp;ssl=1 768w, https://i0.wp.com/aderlab.com/wp-content/uploads/Slide1.jpeg?resize=1536%2C864&amp;ssl=1 1536w, https://i0.wp.com/aderlab.com/wp-content/uploads/Slide1.jpeg?w=1800&amp;ssl=1 1800w, https://i0.wp.com/aderlab.com/wp-content/uploads/Slide1.jpeg?w=1416&amp;ssl=1 1416w" sizes="auto, (max-width: 708px) 100vw, 708px" /></a></figure>



<p class="">好啦，那麼五個簡單好用的 Tableau 實用小技巧就分享到這裡，我們下篇文章見～</p>



<p class="has-text-align-right">Sharon</p>



<hr class="is-style-wide wp-block-separator has-alpha-channel-opacity"/>



<p class="has-medium-font-size"><strong>Buy me a coffee&nbsp; 用行動支持我的內容創作</strong></p>



<p class=""><em>如果我的文章對你有幫助，歡迎用行動支持我的內容創作，小額贊助請我喝咖啡、留言或是寄信來跟我分享你的收穫，都會讓我持續有動力分享更多內容唷～</em></p>



<div class="wp-block-buttons is-layout-flex wp-block-buttons-is-layout-flex">
<div class="aligncenter is-style-fill wp-block-button"><a class="wp-block-button__link has-black-color has-luminous-vivid-amber-background-color has-text-color has-background wp-element-button" href="https://www.buymeacoffee.com/aderlabsharon" target="_blank" rel="noreferrer noopener">以小額贊助支持Sharon</a></div>
</div>
<p>這篇文章 <a href="https://aderlab.com/data-analytics/tableau-useful-guideline/">【Tableau 教學】給非數據人員的 Tableau 使用指南</a> 最早出現於 <a href="https://aderlab.com">Sharon Lab∣雪倫實驗室</a>。</p>
]]></content:encoded>
					
		
		<enclosure url="https://aderlab.com/wp-content/uploads/sortby.mov" length="4969988" type="video/quicktime" />
<enclosure url="https://aderlab.com/wp-content/uploads/Hierarchies_video.mov" length="2022662" type="video/quicktime" />

		<post-id xmlns="com-wordpress:feed-additions:1">5245</post-id>	</item>
		<item>
		<title>【Tableau 進階教學】利用參數設定動態排序</title>
		<link>https://aderlab.com/data-analytics/tableau/dynamic-ranking/</link>
		
		<dc:creator><![CDATA[Sharon]]></dc:creator>
		<pubDate>Sun, 17 Sep 2023 00:00:00 +0000</pubDate>
				<category><![CDATA[Tableau]]></category>
		<category><![CDATA[數據分析]]></category>
		<guid isPermaLink="false">https://aderlab.com/?p=5219</guid>

					<description><![CDATA[<p>這一篇來分享一個 Tableau 的好用設計：用參數選項做出動態排序功能。什麼是動態排序功能呢？動態排序在哪些場景下特別好用呢？這一篇會分享動態排序是什麼，以及&#8230;</p>
<p><a href="https://aderlab.com/data-analytics/tableau/dynamic-ranking/" class="btn-continue">繼續閱讀<span class="arrow-continue">&#8594;</span></a></p>
<p>這篇文章 <a href="https://aderlab.com/data-analytics/tableau/dynamic-ranking/">【Tableau 進階教學】利用參數設定動態排序</a> 最早出現於 <a href="https://aderlab.com">Sharon Lab∣雪倫實驗室</a>。</p>
]]></description>
										<content:encoded><![CDATA[
<p>這一篇來分享一個 Tableau 的好用設計：用參數選項做出動態排序功能。什麼是動態排序功能呢？動態排序在哪些場景下特別好用呢？這一篇會分享動態排序是什麼，以及我們怎麼利用 Tableau 的參數（Parameter）功能來達到動態排序的效果，一起來看看吧！</p>



<figure class="wp-block-video"><video height="1482" style="aspect-ratio: 1598 / 1482;" width="1598" controls src="https://aderlab.com/wp-content/uploads/Dynamic_ranking.mov"></video></figure>



<h2 class="wp-block-heading">動態排序是什麼？詳細使用場景說明</h2>



<p>動態排序是什麼？簡單來說就是讓我們可以透過參數建立的選單，一鍵調整資料排序方式，畢竟數據那麼多，我們不太可能每個數據都要專研到底對吧？所以啊，常常在看數據的時候，我們需要「找重點」，而找重點的關鍵方式之一，就是排序。</p>



<p>我們拿線上銷售的電商產業來舉例，例如說，我們想知道哪些產品賣的好，首先我們要問的是，什麼叫賣的好？有人可能覺得銷售數量很多叫做賣得好，有人可能覺得銷售總金額很多叫賣得好，也有人覺得，毛利（銷售金額 &#8211; 產品成本）高叫做賣的好，也有人甚至要把行銷成本都攤提到每個產品計算後，淨利高才算是賣得好</p>



<p>這幾種想法有誰對誰錯嗎？沒有，因為站的位置不同，對於數據的需求與解讀也就不同。例如說對於庫存管理跟產品管理者，他可能更在意產品的銷售數量，因為產品的銷售數量高，代表他的週轉高，週轉高的產品，就更需要留意庫存充不充足，會不會不夠賣，追加到貨需要幾天，甚至是在產品還沒沒貨前，就要趕快追加下一批商品等。</p>



<p>對於第一線銷售人員、行銷人員：可能銷售數量跟銷售金額都很重要，甚至他們還會考量產品彼此的 Bonding ，有沒有帶產品A會順帶帶產品B等滾綁銷售的機會。</p>



<p>而對於掌管預算、背業績的主管們來說：銷售金額很重要，但毛利額也可能很重要。有時候產品定價會有很多的考量，有些可能是帶貨雞，意思是這項商品可能可以帶動其他的產品銷售，那麼也許這項商品就會設計的價格比較低，以低毛利來吸引新客，也有可能產品本身是白牌貼標賣，那當然利潤空間就會更加有限。畢竟，對主管來說，真正放進口袋的還是是那些扣除產品成本之後的毛利額。</p>



<p>最後則是對於整家公司的老闆來說，上述數字都很重要，但是不能只管產品成本，產品行銷、銷售、宣傳產生的延伸費用也很重要，所以更仔細一點的老闆甚至會把這些費用都評估到銷售費用上，也就是需要評估產品銷售出去之後的淨利額有多高。如果有一個產品銷售額高、毛利率高，但是卻要用到40%的產品定價來行銷，那麼對於多數老闆來說也就不太是划算的生意了。</p>



<p>講到這裡，相信你已經了解了動態排序的使用場景了，總結來說，因應不同的使用情境與數據需求人的需求，我們可以設計用參數調整資料排序，一鍵呈現數據閱聽人想看的重點資料。</p>



<h2 class="wp-block-heading">動態排序怎麼做？</h2>



<p>這一篇的教學，我們延續上面舉的例子，假設我要設一個同時讓倉管人員、第一線銷售行銷人員、主管以及大老闆知道目前的產品銷售狀況使用，並且依照每個人需要的重點指標排序商品的報表，該怎麼製作呢？</p>



<h3 class="wp-block-heading">建立基礎底表</h3>



<p>首先，先把需要的欄與列的維度與指標拉好，像是我想要看到每個產品的銷售額、銷售量、毛利與淨利，我就先把對應的維度跟指標都放到對應的欄與列，接著我想以表格來呈現，所以就選擇 Tableau「文字表」的顯示方式。</p>



<figure class="wp-block-image size-large"><a href="https://i0.wp.com/aderlab.com/wp-content/uploads/basic_table.png?ssl=1"><img data-recalc-dims="1" loading="lazy" decoding="async" width="708" height="393" src="https://i0.wp.com/aderlab.com/wp-content/uploads/basic_table.png?resize=708%2C393&#038;ssl=1" alt="" class="wp-image-5221" srcset="https://i0.wp.com/aderlab.com/wp-content/uploads/basic_table.png?resize=1024%2C568&amp;ssl=1 1024w, https://i0.wp.com/aderlab.com/wp-content/uploads/basic_table.png?resize=300%2C166&amp;ssl=1 300w, https://i0.wp.com/aderlab.com/wp-content/uploads/basic_table.png?resize=768%2C426&amp;ssl=1 768w, https://i0.wp.com/aderlab.com/wp-content/uploads/basic_table.png?resize=1536%2C852&amp;ssl=1 1536w, https://i0.wp.com/aderlab.com/wp-content/uploads/basic_table.png?resize=2048%2C1136&amp;ssl=1 2048w, https://i0.wp.com/aderlab.com/wp-content/uploads/basic_table.png?w=1416&amp;ssl=1 1416w, https://i0.wp.com/aderlab.com/wp-content/uploads/basic_table.png?w=2124&amp;ssl=1 2124w" sizes="auto, (max-width: 708px) 100vw, 708px" /></a></figure>



<h3 class="wp-block-heading">建立排序參數</h3>



<p>接著我們來設定當作排序切換選項的參數設定，也就是你在報表右上角看到「排序方式」的那個下拉選單，首先在右側任意選一個維度或指標按右鍵，接著點選出現選單裡面的「建立」&gt;「參數&#8230;」。</p>



<figure class="wp-block-image size-large"><a href="https://i0.wp.com/aderlab.com/wp-content/uploads/Slide2.png?ssl=1"><img data-recalc-dims="1" loading="lazy" decoding="async" width="708" height="398" src="https://i0.wp.com/aderlab.com/wp-content/uploads/Slide2.png?resize=708%2C398&#038;ssl=1" alt="" class="wp-image-5224" srcset="https://i0.wp.com/aderlab.com/wp-content/uploads/Slide2.png?resize=1024%2C576&amp;ssl=1 1024w, https://i0.wp.com/aderlab.com/wp-content/uploads/Slide2.png?resize=300%2C169&amp;ssl=1 300w, https://i0.wp.com/aderlab.com/wp-content/uploads/Slide2.png?resize=768%2C432&amp;ssl=1 768w, https://i0.wp.com/aderlab.com/wp-content/uploads/Slide2.png?resize=1536%2C864&amp;ssl=1 1536w, https://i0.wp.com/aderlab.com/wp-content/uploads/Slide2.png?w=1801&amp;ssl=1 1801w, https://i0.wp.com/aderlab.com/wp-content/uploads/Slide2.png?w=1416&amp;ssl=1 1416w" sizes="auto, (max-width: 708px) 100vw, 708px" /></a></figure>



<p>資料類型選擇「字串」，允許值手動輸入我們想要讓使用者切換的排序方式，以這份報表的例子來說，我想讓使用者切換的指標有4個，所以我就手動輸入：銷售額、銷售量、毛利與淨利。</p>



<figure class="wp-block-image size-large"><a href="https://i0.wp.com/aderlab.com/wp-content/uploads/Slide3.png?ssl=1"><img data-recalc-dims="1" loading="lazy" decoding="async" width="708" height="398" src="https://i0.wp.com/aderlab.com/wp-content/uploads/Slide3.png?resize=708%2C398&#038;ssl=1" alt="" class="wp-image-5225" srcset="https://i0.wp.com/aderlab.com/wp-content/uploads/Slide3.png?resize=1024%2C576&amp;ssl=1 1024w, https://i0.wp.com/aderlab.com/wp-content/uploads/Slide3.png?resize=300%2C169&amp;ssl=1 300w, https://i0.wp.com/aderlab.com/wp-content/uploads/Slide3.png?resize=768%2C432&amp;ssl=1 768w, https://i0.wp.com/aderlab.com/wp-content/uploads/Slide3.png?resize=1536%2C864&amp;ssl=1 1536w, https://i0.wp.com/aderlab.com/wp-content/uploads/Slide3.png?w=1801&amp;ssl=1 1801w, https://i0.wp.com/aderlab.com/wp-content/uploads/Slide3.png?w=1416&amp;ssl=1 1416w" sizes="auto, (max-width: 708px) 100vw, 708px" /></a></figure>



<h3 class="wp-block-heading">建立計算欄位：透過計算建立參數與欄位的關聯</h3>



<p>參數設定完後不是就沒事了，我們還需要讓選到特定參數的時候，就對應到那個參數值我們想要他對應的值，這樣說可能很抽象，我舉個例子來說明。例如，當我選到參數值是「銷售量」時，就希望可以對應到銷售量這個指標，同理，當我選到參數值是「銷售額」時，也一樣會希望對應到銷售額這個指標。</p>



<p>想要建立計算欄位，我們可以點選在參數區塊，我們上一步驟才建立的參數「排序」，點選右鍵後，選擇「建立」&gt; 「計算欄位&#8230;」。</p>



<figure class="wp-block-image size-large"><a href="https://i0.wp.com/aderlab.com/wp-content/uploads/Slide4.png?ssl=1"><img data-recalc-dims="1" loading="lazy" decoding="async" width="708" height="398" src="https://i0.wp.com/aderlab.com/wp-content/uploads/Slide4.png?resize=708%2C398&#038;ssl=1" alt="" class="wp-image-5226" srcset="https://i0.wp.com/aderlab.com/wp-content/uploads/Slide4.png?resize=1024%2C576&amp;ssl=1 1024w, https://i0.wp.com/aderlab.com/wp-content/uploads/Slide4.png?resize=300%2C169&amp;ssl=1 300w, https://i0.wp.com/aderlab.com/wp-content/uploads/Slide4.png?resize=768%2C432&amp;ssl=1 768w, https://i0.wp.com/aderlab.com/wp-content/uploads/Slide4.png?resize=1536%2C864&amp;ssl=1 1536w, https://i0.wp.com/aderlab.com/wp-content/uploads/Slide4.png?w=1801&amp;ssl=1 1801w, https://i0.wp.com/aderlab.com/wp-content/uploads/Slide4.png?w=1416&amp;ssl=1 1416w" sizes="auto, (max-width: 708px) 100vw, 708px" /></a></figure>



<p>透過以下公式建立參數與欄位的關聯：</p>



<pre class="wp-block-code"><code>if &#91;參數].&#91;排序] = '銷售額' then sum(&#91;銷售額])
elseif &#91;參數].&#91;排序] = '銷售量' then sum(&#91;銷售量])
elseif &#91;參數].&#91;排序] = '毛利' then sum(&#91;毛利])
elseif &#91;參數].&#91;排序] = '淨利' then sum(&#91;淨利])
end</code></pre>



<figure class="wp-block-image size-large"><a href="https://i0.wp.com/aderlab.com/wp-content/uploads/Slide5.png?ssl=1"><img data-recalc-dims="1" loading="lazy" decoding="async" width="708" height="398" src="https://i0.wp.com/aderlab.com/wp-content/uploads/Slide5.png?resize=708%2C398&#038;ssl=1" alt="" class="wp-image-5227" srcset="https://i0.wp.com/aderlab.com/wp-content/uploads/Slide5.png?resize=1024%2C576&amp;ssl=1 1024w, https://i0.wp.com/aderlab.com/wp-content/uploads/Slide5.png?resize=300%2C169&amp;ssl=1 300w, https://i0.wp.com/aderlab.com/wp-content/uploads/Slide5.png?resize=768%2C432&amp;ssl=1 768w, https://i0.wp.com/aderlab.com/wp-content/uploads/Slide5.png?resize=1536%2C864&amp;ssl=1 1536w, https://i0.wp.com/aderlab.com/wp-content/uploads/Slide5.png?w=1801&amp;ssl=1 1801w, https://i0.wp.com/aderlab.com/wp-content/uploads/Slide5.png?w=1416&amp;ssl=1 1416w" sizes="auto, (max-width: 708px) 100vw, 708px" /></a></figure>



<h3 class="wp-block-heading">設定維度排序</h3>



<p>上面兩個步驟完成之後，我們就可以來針對維度做排序設定了，在「列」上的「產品名稱」點選右鍵，接著選擇「排序&#8230;」</p>



<figure class="wp-block-image size-large"><a href="https://i0.wp.com/aderlab.com/wp-content/uploads/Slide6.png?ssl=1"><img data-recalc-dims="1" loading="lazy" decoding="async" width="708" height="398" src="https://i0.wp.com/aderlab.com/wp-content/uploads/Slide6.png?resize=708%2C398&#038;ssl=1" alt="" class="wp-image-5228" srcset="https://i0.wp.com/aderlab.com/wp-content/uploads/Slide6.png?resize=1024%2C576&amp;ssl=1 1024w, https://i0.wp.com/aderlab.com/wp-content/uploads/Slide6.png?resize=300%2C169&amp;ssl=1 300w, https://i0.wp.com/aderlab.com/wp-content/uploads/Slide6.png?resize=768%2C432&amp;ssl=1 768w, https://i0.wp.com/aderlab.com/wp-content/uploads/Slide6.png?resize=1536%2C864&amp;ssl=1 1536w, https://i0.wp.com/aderlab.com/wp-content/uploads/Slide6.png?w=1801&amp;ssl=1 1801w, https://i0.wp.com/aderlab.com/wp-content/uploads/Slide6.png?w=1416&amp;ssl=1 1416w" sizes="auto, (max-width: 708px) 100vw, 708px" /></a></figure>



<p>排序設定有三個需要設定的區塊，第一個區塊是「排序依據」，分別有：依照資料來源順序、字母、欄位、手動、巢狀來排序，大部分的排序意思就跟字面上表達的意思一樣，不過我想來特別說說欄位與巢狀排序的差異。以我們這份例子來說，用欄位排序跟巢狀排序都可以，因為我們的維度層只有一層，也就是只有「產品名稱」這一層，但假設你的資料維度不只一層，甚至是資料可以展開，那使用欄位跟巢狀就會有很大的差異，巢狀排序會在不同階層重新判斷排序欄位的彙總值，而欄位只會以最上面一層的排序來排序，所以大方向會建議當維度多於一層時，可以以「巢狀」排序優先。</p>



<p>第二個區塊是「排序順序」，也就是你可以決定排序是要遞增排序，還是想要遞減排序。</p>



<p>第三個區塊則是「欄位名稱」與「彙總」，這是只有在你在「排序依據」選擇「欄位」或是「巢狀」時才會出現的選項。這時，就要用上我們上兩個步驟辛辛苦苦建立的計算欄位啦，選擇剛剛透過計算建立的欄位「排序」，這步驟設定完，動態排序就大功告成了。</p>



<figure class="wp-block-image size-large is-resized"><a href="https://i0.wp.com/aderlab.com/wp-content/uploads/Slide7.png?ssl=1"><img data-recalc-dims="1" loading="lazy" decoding="async" src="https://i0.wp.com/aderlab.com/wp-content/uploads/Slide7.png?resize=708%2C398&#038;ssl=1" alt="" class="wp-image-5229" style="width:841px;height:473px" width="708" height="398" srcset="https://i0.wp.com/aderlab.com/wp-content/uploads/Slide7.png?resize=1024%2C576&amp;ssl=1 1024w, https://i0.wp.com/aderlab.com/wp-content/uploads/Slide7.png?resize=300%2C169&amp;ssl=1 300w, https://i0.wp.com/aderlab.com/wp-content/uploads/Slide7.png?resize=768%2C432&amp;ssl=1 768w, https://i0.wp.com/aderlab.com/wp-content/uploads/Slide7.png?resize=1536%2C864&amp;ssl=1 1536w, https://i0.wp.com/aderlab.com/wp-content/uploads/Slide7.png?w=1801&amp;ssl=1 1801w, https://i0.wp.com/aderlab.com/wp-content/uploads/Slide7.png?w=1416&amp;ssl=1 1416w" sizes="auto, (max-width: 708px) 100vw, 708px" /></a></figure>



<p>最後，也提供我的 Tableau 範例供參考：https://public.tableau.com/app/profile/sharon.lab/viz/2_16948586545980/sheet2</p>



<p>那今天關於如何用參數做出動態排序的報表就分享到這裡啦，我們下篇文章見～</p>



<p class="has-text-align-right">Sharon</p>



<hr class="wp-block-separator has-alpha-channel-opacity is-style-wide"/>



<p class="has-medium-font-size"><strong>Buy me a coffee&nbsp; 用行動支持我的內容創作</strong></p>



<p><em>如果我的文章對你有幫助，歡迎用行動支持我的內容創作，小額贊助請我喝咖啡、留言或是寄信來跟我分享你的收穫，都會讓我持續有動力分享更多內容唷～</em></p>



<div class="wp-block-buttons is-layout-flex wp-block-buttons-is-layout-flex">
<div class="wp-block-button aligncenter is-style-fill"><a class="wp-block-button__link has-black-color has-luminous-vivid-amber-background-color has-text-color has-background wp-element-button" href="https://www.buymeacoffee.com/aderlabsharon" target="_blank" rel="noreferrer noopener">以小額贊助支持Sharon</a></div>
</div>
<p>這篇文章 <a href="https://aderlab.com/data-analytics/tableau/dynamic-ranking/">【Tableau 進階教學】利用參數設定動態排序</a> 最早出現於 <a href="https://aderlab.com">Sharon Lab∣雪倫實驗室</a>。</p>
]]></content:encoded>
					
		
		<enclosure url="https://aderlab.com/wp-content/uploads/Dynamic_ranking.mov" length="8272325" type="video/quicktime" />

		<post-id xmlns="com-wordpress:feed-additions:1">5219</post-id>	</item>
		<item>
		<title>【Tableau 進階教學】設定動態圖表標題與報表隱藏顯示按鈕</title>
		<link>https://aderlab.com/data-analytics/tableau-dynamic-title-button/</link>
		
		<dc:creator><![CDATA[Sharon]]></dc:creator>
		<pubDate>Sat, 26 Aug 2023 01:00:00 +0000</pubDate>
				<category><![CDATA[Tableau]]></category>
		<category><![CDATA[數據分析]]></category>
		<guid isPermaLink="false">https://aderlab.com/?p=5155</guid>

					<description><![CDATA[<p>上一篇的Tableau進階應用：【Tableau 進階教學】動態切換圖表數據指標，分享了如何做到利用參數，彈性切換圖表呈現的數據指標，這一篇延續上次分享的設計報&#8230;</p>
<p><a href="https://aderlab.com/data-analytics/tableau-dynamic-title-button/" class="btn-continue">繼續閱讀<span class="arrow-continue">&#8594;</span></a></p>
<p>這篇文章 <a href="https://aderlab.com/data-analytics/tableau-dynamic-title-button/">【Tableau 進階教學】設定動態圖表標題與報表隱藏顯示按鈕</a> 最早出現於 <a href="https://aderlab.com">Sharon Lab∣雪倫實驗室</a>。</p>
]]></description>
										<content:encoded><![CDATA[
<p>上一篇的Tableau進階應用：<a href="https://aderlab.com/data-analytics/tableau-dynamic-indicators/">【Tableau 進階教學】動態切換圖表數據指標</a>，分享了如何做到利用參數，彈性切換圖表呈現的數據指標，這一篇延續上次分享的設計報表，來分享這份報表的另外三個報表重點設計：動態切換圖表標題、隱藏與顯示按鈕以及資料下載按鈕。</p>



<h2 class="wp-block-heading">如何讓標題動態更換？</h2>



<p>仔細看報表下方的橫條圖你會發現，當我們在使用指標切換器調整要呈現的數據指標後，該張圖表的標題也會隨之變動，例如，當我把指標切換器選到「銷售額」時，左邊與右邊的橫條圖標題就會分別顯示成「銷售額最高的前 5 大城市」、「銷售額最高的前 5 大產品次分類」，而當我把指標切換器選到「訂單」時，左邊與右邊的橫條圖標題則會變成顯示「訂單最高的前 5 大城市」、「訂單最高的前 5 大產品次分類」。</p>



<figure class="wp-block-video"><video height="964" style="aspect-ratio: 1664 / 964;" width="1664" controls src="https://aderlab.com/wp-content/uploads/tableau-advance-video-1.mov"></video></figure>



<p>這個功能特別適合用在圖表有設計動態調整數據指標或維度的時候，這樣可以讓使用者更清楚的了解目前圖表所展示的指標與圖表的內容是什麼，那麼怎麼設定標題動態更換呢？很簡單，我們只要到圖表所屬的工作表，在工作表的最上方標題處點擊兩下，就可以叫出設定標題的小視窗。</p>



<figure class="wp-block-image size-large"><a href="https://i0.wp.com/aderlab.com/wp-content/uploads/title-1.png?ssl=1"><img data-recalc-dims="1" loading="lazy" decoding="async" width="708" height="398" src="https://i0.wp.com/aderlab.com/wp-content/uploads/title-1.png?resize=708%2C398&#038;ssl=1" alt="" class="wp-image-5186" srcset="https://i0.wp.com/aderlab.com/wp-content/uploads/title-1.png?resize=1024%2C576&amp;ssl=1 1024w, https://i0.wp.com/aderlab.com/wp-content/uploads/title-1.png?resize=300%2C169&amp;ssl=1 300w, https://i0.wp.com/aderlab.com/wp-content/uploads/title-1.png?resize=768%2C432&amp;ssl=1 768w, https://i0.wp.com/aderlab.com/wp-content/uploads/title-1.png?resize=1536%2C864&amp;ssl=1 1536w, https://i0.wp.com/aderlab.com/wp-content/uploads/title-1.png?w=1801&amp;ssl=1 1801w, https://i0.wp.com/aderlab.com/wp-content/uploads/title-1.png?w=1416&amp;ssl=1 1416w" sizes="auto, (max-width: 708px) 100vw, 708px" /></a></figure>



<p>每個工作表的預設標題都是工作表的名稱，所以如果你工作表取名叫做「工作表1」，那麼你的工作表最上方出現的標題名稱就會是「工作表1」，如果你希望以工作表最下方設定的名稱來命名，那就不需要做任何調整，只需要留意每張工作表的命名即可。</p>



<figure class="wp-block-image size-large"><a href="https://i0.wp.com/aderlab.com/wp-content/uploads/title-2.png?ssl=1"><img data-recalc-dims="1" loading="lazy" decoding="async" width="708" height="398" src="https://i0.wp.com/aderlab.com/wp-content/uploads/title-2.png?resize=708%2C398&#038;ssl=1" alt="" class="wp-image-5187" srcset="https://i0.wp.com/aderlab.com/wp-content/uploads/title-2.png?resize=1024%2C576&amp;ssl=1 1024w, https://i0.wp.com/aderlab.com/wp-content/uploads/title-2.png?resize=300%2C169&amp;ssl=1 300w, https://i0.wp.com/aderlab.com/wp-content/uploads/title-2.png?resize=768%2C432&amp;ssl=1 768w, https://i0.wp.com/aderlab.com/wp-content/uploads/title-2.png?resize=1536%2C864&amp;ssl=1 1536w, https://i0.wp.com/aderlab.com/wp-content/uploads/title-2.png?w=1801&amp;ssl=1 1801w, https://i0.wp.com/aderlab.com/wp-content/uploads/title-2.png?w=1416&amp;ssl=1 1416w" sizes="auto, (max-width: 708px) 100vw, 708px" /></a></figure>



<p>而如果你想要讓標題動態更換的話，則可以使用標題設定小視窗裡面的「插入」功能。</p>



<p>什麼樣的內容可以放到標題裡？除了預設的工作表名稱之外，你可以看到插入功能還包括了可以插入「頁碼」、「資料來源名稱」、「參數」以及所有你有放到欄、列、文字以及詳細資料的資料都可以指定為標題名稱，甚至你也可以組合不同的欄位變成標題名稱。</p>



<p>唯一要注意的是，如果我們沒有把想要顯示在標題的欄位拉到欄、列、文字以及詳細資料任一區塊，在「插入」功能是不會看到那個指標或維度的選項，而參數則是只要有建立，全表適用參數，所以所有的參數都可以被選為標題內容的一環，不需要額外的設定。</p>



<figure class="wp-block-image size-large"><a href="https://i0.wp.com/aderlab.com/wp-content/uploads/title-4.png?ssl=1"><img data-recalc-dims="1" loading="lazy" decoding="async" width="708" height="398" src="https://i0.wp.com/aderlab.com/wp-content/uploads/title-4.png?resize=708%2C398&#038;ssl=1" alt="" class="wp-image-5189" srcset="https://i0.wp.com/aderlab.com/wp-content/uploads/title-4.png?resize=1024%2C576&amp;ssl=1 1024w, https://i0.wp.com/aderlab.com/wp-content/uploads/title-4.png?resize=300%2C169&amp;ssl=1 300w, https://i0.wp.com/aderlab.com/wp-content/uploads/title-4.png?resize=768%2C432&amp;ssl=1 768w, https://i0.wp.com/aderlab.com/wp-content/uploads/title-4.png?resize=1536%2C864&amp;ssl=1 1536w, https://i0.wp.com/aderlab.com/wp-content/uploads/title-4.png?w=1801&amp;ssl=1 1801w, https://i0.wp.com/aderlab.com/wp-content/uploads/title-4.png?w=1416&amp;ssl=1 1416w" sizes="auto, (max-width: 708px) 100vw, 708px" /></a></figure>



<p>那麼，我們來回到最一開始的問題，所以我們這份報表的動態標題是怎麼做出來的呢？很簡單，我們只需要把指標切換器的名稱欄位，透過「插入」功能，放到標題設定的區塊，那麼在我們切換數據時，標題就會連帶的更動了！而我在這份報表做的，就是輸入固定不變的標題，接著搭配插入參數來使用，自然而然就可以做到動態切換標題的效果了！</p>



<figure class="wp-block-image size-large"><a href="https://i0.wp.com/aderlab.com/wp-content/uploads/title-3.png?ssl=1"><img data-recalc-dims="1" loading="lazy" decoding="async" width="708" height="398" src="https://i0.wp.com/aderlab.com/wp-content/uploads/title-3.png?resize=708%2C398&#038;ssl=1" alt="" class="wp-image-5188" srcset="https://i0.wp.com/aderlab.com/wp-content/uploads/title-3.png?resize=1024%2C576&amp;ssl=1 1024w, https://i0.wp.com/aderlab.com/wp-content/uploads/title-3.png?resize=300%2C169&amp;ssl=1 300w, https://i0.wp.com/aderlab.com/wp-content/uploads/title-3.png?resize=768%2C432&amp;ssl=1 768w, https://i0.wp.com/aderlab.com/wp-content/uploads/title-3.png?resize=1536%2C864&amp;ssl=1 1536w, https://i0.wp.com/aderlab.com/wp-content/uploads/title-3.png?w=1801&amp;ssl=1 1801w, https://i0.wp.com/aderlab.com/wp-content/uploads/title-3.png?w=1416&amp;ssl=1 1416w" sizes="auto, (max-width: 708px) 100vw, 708px" /></a></figure>



<h2 class="wp-block-heading">怎麼做出報表的顯示與隱藏按鈕？</h2>



<p>怎麼讓使用者自由切換報表的某些元素要出現還是不出現呢？例如這份報表，我想讓畫面比較乾淨，所以預設先將參數篩選器隱藏起來，當使用者真的要使用的時候，再打開來使用。</p>



<p>如果你需要隱藏的元素很單純，例如說只有一個篩選器、一張圖表或是一個文字、標題等，你只要點到那個你想要隱藏的區塊，然後把該區塊右側的小三角形點開來，選擇「新增顯示/隱藏按鈕」，一開始會出現一個「X」的符號，其實就完成了設定，代表說使用者可以透過點「X」這個符號來顯示或是隱藏剛剛我們選擇的篩選器、圖表或是文字、標題等。</p>



<figure class="wp-block-image size-large"><a href="https://i0.wp.com/aderlab.com/wp-content/uploads/showhidden.png?ssl=1"><img data-recalc-dims="1" loading="lazy" decoding="async" width="708" height="398" src="https://i0.wp.com/aderlab.com/wp-content/uploads/showhidden.png?resize=708%2C398&#038;ssl=1" alt="" class="wp-image-5192" srcset="https://i0.wp.com/aderlab.com/wp-content/uploads/showhidden.png?resize=1024%2C576&amp;ssl=1 1024w, https://i0.wp.com/aderlab.com/wp-content/uploads/showhidden.png?resize=300%2C169&amp;ssl=1 300w, https://i0.wp.com/aderlab.com/wp-content/uploads/showhidden.png?resize=768%2C432&amp;ssl=1 768w, https://i0.wp.com/aderlab.com/wp-content/uploads/showhidden.png?resize=1536%2C864&amp;ssl=1 1536w, https://i0.wp.com/aderlab.com/wp-content/uploads/showhidden.png?w=1801&amp;ssl=1 1801w, https://i0.wp.com/aderlab.com/wp-content/uploads/showhidden.png?w=1416&amp;ssl=1 1416w" sizes="auto, (max-width: 708px) 100vw, 708px" /></a></figure>



<p>但如果你想要讓隱藏按鈕多點設計，那麼你就再點選這個隱藏按鈕旁邊的小三角形，接著按下「編輯按鈕」，就可以設定隱藏或顯示時，是以文字或是圖片來呈現。</p>



<figure class="wp-block-image size-large"><a href="https://i0.wp.com/aderlab.com/wp-content/uploads/showhidden-2.png?ssl=1"><img data-recalc-dims="1" loading="lazy" decoding="async" width="708" height="398" src="https://i0.wp.com/aderlab.com/wp-content/uploads/showhidden-2.png?resize=708%2C398&#038;ssl=1" alt="" class="wp-image-5193" srcset="https://i0.wp.com/aderlab.com/wp-content/uploads/showhidden-2.png?resize=1024%2C576&amp;ssl=1 1024w, https://i0.wp.com/aderlab.com/wp-content/uploads/showhidden-2.png?resize=300%2C169&amp;ssl=1 300w, https://i0.wp.com/aderlab.com/wp-content/uploads/showhidden-2.png?resize=768%2C432&amp;ssl=1 768w, https://i0.wp.com/aderlab.com/wp-content/uploads/showhidden-2.png?resize=1536%2C864&amp;ssl=1 1536w, https://i0.wp.com/aderlab.com/wp-content/uploads/showhidden-2.png?w=1801&amp;ssl=1 1801w, https://i0.wp.com/aderlab.com/wp-content/uploads/showhidden-2.png?w=1416&amp;ssl=1 1416w" sizes="auto, (max-width: 708px) 100vw, 708px" /></a></figure>



<p>隱藏與顯示都可以各上傳一張來代表，最後就可以顯示成開啟的時候以你在「標題外觀」>「顯示的項目」這邊上傳的圖片來顯示，而關閉的時候則以你在「標題外觀」>「隱藏的項目」這邊上傳的圖片來顯示。</p>



<figure class="wp-block-image size-large"><img data-recalc-dims="1" loading="lazy" decoding="async" width="708" height="398" src="https://i0.wp.com/aderlab.com/wp-content/uploads/showhidden-4.png?resize=708%2C398&#038;ssl=1" alt="" class="wp-image-5198" srcset="https://i0.wp.com/aderlab.com/wp-content/uploads/showhidden-4.png?resize=1024%2C576&amp;ssl=1 1024w, https://i0.wp.com/aderlab.com/wp-content/uploads/showhidden-4.png?resize=300%2C169&amp;ssl=1 300w, https://i0.wp.com/aderlab.com/wp-content/uploads/showhidden-4.png?resize=768%2C432&amp;ssl=1 768w, https://i0.wp.com/aderlab.com/wp-content/uploads/showhidden-4.png?resize=1536%2C864&amp;ssl=1 1536w, https://i0.wp.com/aderlab.com/wp-content/uploads/showhidden-4.png?w=1801&amp;ssl=1 1801w, https://i0.wp.com/aderlab.com/wp-content/uploads/showhidden-4.png?w=1416&amp;ssl=1 1416w" sizes="auto, (max-width: 708px) 100vw, 708px" /></figure>



<p>那麼，如果你想像我這份範例一樣，透過一個按鈕，同時隱蔽與開啟1個以上的圖表、篩選器怎麼辦？這時候，你就要善用 Tableau 裡面的「容器 Container」功能了。在動手做之前，我們先來看看整份報表的架構。點開報表左上角的「版面配置」，接著點選你想要看的欄位，可以發現這份報表現有的三個參數選項，都放置在一個名為 Filter 的容器下面。</p>



<p>這邊功能就很像是在 Power Point 我們會將很多圖片、區塊組成群組，這樣就可以透過群組移動，同時移動兩個以上不同區塊的內容，而容器其實就像是把不同的區塊內容組裝在一起，變成一個群組的概念，所以我只要針對這個容器做「顯示/隱藏」設定，就可以達到同時顯示與隱藏的效果了。</p>



<figure class="wp-block-image size-large"><img data-recalc-dims="1" loading="lazy" decoding="async" width="708" height="398" src="https://i0.wp.com/aderlab.com/wp-content/uploads/container.png?resize=708%2C398&#038;ssl=1" alt="" class="wp-image-5199" srcset="https://i0.wp.com/aderlab.com/wp-content/uploads/container.png?resize=1024%2C576&amp;ssl=1 1024w, https://i0.wp.com/aderlab.com/wp-content/uploads/container.png?resize=300%2C169&amp;ssl=1 300w, https://i0.wp.com/aderlab.com/wp-content/uploads/container.png?resize=768%2C432&amp;ssl=1 768w, https://i0.wp.com/aderlab.com/wp-content/uploads/container.png?resize=1536%2C864&amp;ssl=1 1536w, https://i0.wp.com/aderlab.com/wp-content/uploads/container.png?w=1801&amp;ssl=1 1801w, https://i0.wp.com/aderlab.com/wp-content/uploads/container.png?w=1416&amp;ssl=1 1416w" sizes="auto, (max-width: 708px) 100vw, 708px" /></figure>



<p>接著我們來看看容器要怎麼拉到報表裡吧！點開左上方「儀表板」的區塊，最下面的物件可以看到「水平容器」以及「垂直容器」，這兩個物件就是剛剛提到的容器。</p>



<figure class="wp-block-image size-large"><img data-recalc-dims="1" loading="lazy" decoding="async" width="708" height="398" src="https://i0.wp.com/aderlab.com/wp-content/uploads/float-vertical.png?resize=708%2C398&#038;ssl=1" alt="" class="wp-image-5201" srcset="https://i0.wp.com/aderlab.com/wp-content/uploads/float-vertical.png?resize=1024%2C576&amp;ssl=1 1024w, https://i0.wp.com/aderlab.com/wp-content/uploads/float-vertical.png?resize=300%2C169&amp;ssl=1 300w, https://i0.wp.com/aderlab.com/wp-content/uploads/float-vertical.png?resize=768%2C432&amp;ssl=1 768w, https://i0.wp.com/aderlab.com/wp-content/uploads/float-vertical.png?resize=1536%2C864&amp;ssl=1 1536w, https://i0.wp.com/aderlab.com/wp-content/uploads/float-vertical.png?w=1801&amp;ssl=1 1801w, https://i0.wp.com/aderlab.com/wp-content/uploads/float-vertical.png?w=1416&amp;ssl=1 1416w" sizes="auto, (max-width: 708px) 100vw, 708px" /></figure>



<p>不論選擇哪一個，都可以達到把不同的圖表、篩選器群組在一起的效果，差別只在於，如果你希望容器內的欄位以水平方式並列，就可以選擇垂直容器，而如果你希望容器內的欄位以水平方式並列，那就可以選擇水平容器（可以參考下圖的排列方式）。</p>



<figure class="wp-block-image size-large"><img data-recalc-dims="1" loading="lazy" decoding="async" width="708" height="398" src="https://i0.wp.com/aderlab.com/wp-content/uploads/float-vertical-horizen.png?resize=708%2C398&#038;ssl=1" alt="" class="wp-image-5202" srcset="https://i0.wp.com/aderlab.com/wp-content/uploads/float-vertical-horizen.png?resize=1024%2C576&amp;ssl=1 1024w, https://i0.wp.com/aderlab.com/wp-content/uploads/float-vertical-horizen.png?resize=300%2C169&amp;ssl=1 300w, https://i0.wp.com/aderlab.com/wp-content/uploads/float-vertical-horizen.png?resize=768%2C432&amp;ssl=1 768w, https://i0.wp.com/aderlab.com/wp-content/uploads/float-vertical-horizen.png?resize=1536%2C864&amp;ssl=1 1536w, https://i0.wp.com/aderlab.com/wp-content/uploads/float-vertical-horizen.png?w=1801&amp;ssl=1 1801w, https://i0.wp.com/aderlab.com/wp-content/uploads/float-vertical-horizen.png?w=1416&amp;ssl=1 1416w" sizes="auto, (max-width: 708px) 100vw, 708px" /></figure>



<p>把容器拉到畫布後，你會看到容器內有一段的提示文字，會告訴你怎麼將現有的工作表或是篩選器拉到容器裡面，你只需要選到你想要放入容器的工作表、篩選器後，再按Shift鍵，最後拖曳到容器內的空白處就完成了。</p>



<figure class="wp-block-image size-large"><img data-recalc-dims="1" loading="lazy" decoding="async" width="708" height="398" src="https://i0.wp.com/aderlab.com/wp-content/uploads/addincontainer.png?resize=708%2C398&#038;ssl=1" alt="" class="wp-image-5200" srcset="https://i0.wp.com/aderlab.com/wp-content/uploads/addincontainer.png?resize=1024%2C576&amp;ssl=1 1024w, https://i0.wp.com/aderlab.com/wp-content/uploads/addincontainer.png?resize=300%2C169&amp;ssl=1 300w, https://i0.wp.com/aderlab.com/wp-content/uploads/addincontainer.png?resize=768%2C432&amp;ssl=1 768w, https://i0.wp.com/aderlab.com/wp-content/uploads/addincontainer.png?resize=1536%2C864&amp;ssl=1 1536w, https://i0.wp.com/aderlab.com/wp-content/uploads/addincontainer.png?w=1801&amp;ssl=1 1801w, https://i0.wp.com/aderlab.com/wp-content/uploads/addincontainer.png?w=1416&amp;ssl=1 1416w" sizes="auto, (max-width: 708px) 100vw, 708px" /></figure>



<p>最後，當所有的工作表或篩選器都放到容器之後，我們就可以來針對容器做設定了。選擇容器的時候要特別小心，因為點選過程非常容易只選擇到其中一個容器內的工作表或是篩選器，所以我的建議是，可以從左上方的「版面配置」點進去看，確認是真的點選到容器，再往下設定。</p>



<p>接下來的步驟就跟上面分享過的步驟一模一樣，我們一樣是透過容器右上方的小三角形，點選「新增顯示/隱藏按鈕」。</p>



<figure class="wp-block-image size-large"><img data-recalc-dims="1" loading="lazy" decoding="async" width="708" height="398" src="https://i0.wp.com/aderlab.com/wp-content/uploads/select-container.png?resize=708%2C398&#038;ssl=1" alt="" class="wp-image-5203" srcset="https://i0.wp.com/aderlab.com/wp-content/uploads/select-container.png?resize=1024%2C576&amp;ssl=1 1024w, https://i0.wp.com/aderlab.com/wp-content/uploads/select-container.png?resize=300%2C169&amp;ssl=1 300w, https://i0.wp.com/aderlab.com/wp-content/uploads/select-container.png?resize=768%2C432&amp;ssl=1 768w, https://i0.wp.com/aderlab.com/wp-content/uploads/select-container.png?resize=1536%2C864&amp;ssl=1 1536w, https://i0.wp.com/aderlab.com/wp-content/uploads/select-container.png?w=1801&amp;ssl=1 1801w, https://i0.wp.com/aderlab.com/wp-content/uploads/select-container.png?w=1416&amp;ssl=1 1416w" sizes="auto, (max-width: 708px) 100vw, 708px" /></figure>



<p>接著就會出現「X」的圖示，到這個步驟就算是完成了按鈕，不過如果你想針對按鈕以文字還是圖片的方式顯示，就可以再點選按鈕的小三角形，然後「編輯按鈕」，就可以接續編輯按鈕了。</p>



<figure class="wp-block-image size-large"><img data-recalc-dims="1" loading="lazy" decoding="async" width="708" height="398" src="https://i0.wp.com/aderlab.com/wp-content/uploads/container-setup.png?resize=708%2C398&#038;ssl=1" alt="" class="wp-image-5205" srcset="https://i0.wp.com/aderlab.com/wp-content/uploads/container-setup.png?resize=1024%2C576&amp;ssl=1 1024w, https://i0.wp.com/aderlab.com/wp-content/uploads/container-setup.png?resize=300%2C169&amp;ssl=1 300w, https://i0.wp.com/aderlab.com/wp-content/uploads/container-setup.png?resize=768%2C432&amp;ssl=1 768w, https://i0.wp.com/aderlab.com/wp-content/uploads/container-setup.png?resize=1536%2C864&amp;ssl=1 1536w, https://i0.wp.com/aderlab.com/wp-content/uploads/container-setup.png?w=1801&amp;ssl=1 1801w, https://i0.wp.com/aderlab.com/wp-content/uploads/container-setup.png?w=1416&amp;ssl=1 1416w" sizes="auto, (max-width: 708px) 100vw, 708px" /></figure>



<p>那關於這份報表的製作方式就分享到這裡啦，祝福大家都能設計出好看又實用的報表，我們下篇文章見：）</p>



<p class="has-text-align-right">Sharon</p>



<hr class="wp-block-separator has-alpha-channel-opacity is-style-wide"/>



<p class="has-medium-font-size"><strong>Buy me a coffee&nbsp; 用行動支持我的內容創作</strong></p>



<p><em>如果我的文章對你有幫助，歡迎用行動支持我的內容創作，小額贊助請我喝咖啡、留言或是寄信來跟我分享你的收穫，都會讓我持續有動力分享更多內容唷～</em></p>



<div class="wp-block-buttons is-layout-flex wp-block-buttons-is-layout-flex">
<div class="wp-block-button aligncenter is-style-fill"><a class="wp-block-button__link has-black-color has-luminous-vivid-amber-background-color has-text-color has-background wp-element-button" href="https://www.buymeacoffee.com/aderlabsharon" target="_blank" rel="noreferrer noopener">以小額贊助支持Sharon</a></div>
</div>
<p>這篇文章 <a href="https://aderlab.com/data-analytics/tableau-dynamic-title-button/">【Tableau 進階教學】設定動態圖表標題與報表隱藏顯示按鈕</a> 最早出現於 <a href="https://aderlab.com">Sharon Lab∣雪倫實驗室</a>。</p>
]]></content:encoded>
					
		
		<enclosure url="https://aderlab.com/wp-content/uploads/tableau-advance-video-1.mov" length="33600267" type="video/quicktime" />

		<post-id xmlns="com-wordpress:feed-additions:1">5155</post-id>	</item>
		<item>
		<title>【Tableau 進階教學】動態切換圖表數據指標</title>
		<link>https://aderlab.com/data-analytics/tableau-dynamic-indicators/</link>
		
		<dc:creator><![CDATA[Sharon]]></dc:creator>
		<pubDate>Sat, 29 Jul 2023 01:00:00 +0000</pubDate>
				<category><![CDATA[Tableau]]></category>
		<category><![CDATA[數據分析]]></category>
		<guid isPermaLink="false">https://aderlab.com/?p=5146</guid>

					<description><![CDATA[<p>這一篇我將會分享如何做出如下面報表一樣，可以自由切換數據指標的TOP5長條圖，裡面用到的技巧包括：參數清單設定、計算欄位的條件式以及集合設定，那就開始囉！ 動態&#8230;</p>
<p><a href="https://aderlab.com/data-analytics/tableau-dynamic-indicators/" class="btn-continue">繼續閱讀<span class="arrow-continue">&#8594;</span></a></p>
<p>這篇文章 <a href="https://aderlab.com/data-analytics/tableau-dynamic-indicators/">【Tableau 進階教學】動態切換圖表數據指標</a> 最早出現於 <a href="https://aderlab.com">Sharon Lab∣雪倫實驗室</a>。</p>
]]></description>
										<content:encoded><![CDATA[
<p>這一篇我將會分享如何做出如下面報表一樣，可以自由切換數據指標的TOP5長條圖，裡面用到的技巧包括：參數清單設定、計算欄位的條件式以及集合設定，那就開始囉！</p>



<figure class="wp-block-video"><video height="964" style="aspect-ratio: 1664 / 964;" width="1664" autoplay controls loop muted src="https://aderlab.com/wp-content/uploads/tableau-advance-video-1.mov"></video></figure>



<h2 class="wp-block-heading">動態切換指標的使用情境</h2>



<p>動態切換數據指標適合在三種情境：</p>



<p>第一種情境是報表設計給使用者自行使用，可以讓使用者在使用時可以彈性應用，透過按鈕切換看到不同的數據。</p>



<p>第二種情境則是在業績報告的時候特別好用，在一個會議情境裡面，可能會有不同的閱聽人，不同閱聽人可能在意不同的指標，當我們想要同時呈現多個指標，卻不想要設計多個重複圖表時，使用動態切換指標的設計就非常實用。</p>



<p>第三種情境則是可以應用在自己的面試作品集上，可以展現出 Tableau 的熟悉度，比起在履歷上寫具備 Tableau 的技能會更有說服力（不過啊，除了報表製作的熟悉度之外，真正的重要的還是從數據當中你解讀出了什麼訊息。）</p>



<p>以這篇文章提供的範例來說，在同一個TOP5長條圖裡，我可以透過選擇不同的「指標切換器」，讓圖表可以動態切換成以銷售量排序、以銷量排序、以訂單多到少排序、以利潤大到小排序以及以客戶數大到小排序，前5大排名的城市或是前5大排名的產品次分類。</p>



<h2 class="wp-block-heading">如何設定動態切換指標按鈕？</h2>



<h3 class="wp-block-heading">1. 建立需要的數據指標</h3>



<p>我的這份範例是設計成透過「篩選月份」以及「篩選年份」，來篩選對應年份與月份的數據指標（Sales、Quantity、Profit、Order、Customer），所以在設計指標器前，需要先針對這5個指標都分別建立計算欄位。具體操作步驟可以參考上次我分享過的這篇文章的教學：<a href="https://aderlab.com/data-analytics/tableau-date-compared-advanced/" target="_blank" rel="noreferrer noopener">【Tableau 進階教學】做出MOM、YOY、YTD互動式報表</a>。</p>



<p>當然，你也可以選擇改用篩選器篩選區間的方式讓圖表呈現的數據指標對應日期篩選器選取的區間，那麼就可以略過這個步驟，直接以資料現有的數據指標直接使用即可。</p>



<h3 class="wp-block-heading">2. 設定想要切換的「參數清單」</h3>



<p>在這份報表裡我總共想要提供 5 個指標供自由切換，所以我們可以先建立一個參數清單，之後便可以透過這個參數清單，切換呈現成不同的數據指標。</p>



<p>首先，我們可以在左側的空白處點選右鍵，再點選「建立參數&#8230;」。</p>



<figure class="wp-block-image size-large"><a href="https://i0.wp.com/aderlab.com/wp-content/uploads/setup-parameter.png?ssl=1"><img data-recalc-dims="1" loading="lazy" decoding="async" width="708" height="398" src="https://i0.wp.com/aderlab.com/wp-content/uploads/setup-parameter.png?resize=708%2C398&#038;ssl=1" alt="" class="wp-image-5148" srcset="https://i0.wp.com/aderlab.com/wp-content/uploads/setup-parameter.png?resize=1024%2C576&amp;ssl=1 1024w, https://i0.wp.com/aderlab.com/wp-content/uploads/setup-parameter.png?resize=300%2C169&amp;ssl=1 300w, https://i0.wp.com/aderlab.com/wp-content/uploads/setup-parameter.png?resize=768%2C432&amp;ssl=1 768w, https://i0.wp.com/aderlab.com/wp-content/uploads/setup-parameter.png?resize=1536%2C864&amp;ssl=1 1536w, https://i0.wp.com/aderlab.com/wp-content/uploads/setup-parameter.png?w=1801&amp;ssl=1 1801w, https://i0.wp.com/aderlab.com/wp-content/uploads/setup-parameter.png?w=1416&amp;ssl=1 1416w" sizes="auto, (max-width: 708px) 100vw, 708px" /></a></figure>



<p>接著，我們來設定這個參數的列表，因為我想要做到切換 5 個指標，所以我就建立一個格式為字串，允許值分別為：「銷售額」、「銷售量」、「利潤」、「訂單」與「客戶數」的參數清單，設定內容如下圖所示。</p>



<p>如果你只需要切換三個指標，那麼在下方的清單當中就只需要輸入3個你想要切換的指標即可，至於清單內的值的名稱要怎麼取呢？取什麼名稱其實都可以，只要你看得懂、使用者在使用時也看得懂名稱代表的數據指標是什麼就可以了。</p>



<figure class="wp-block-image size-large"><a href="https://i0.wp.com/aderlab.com/wp-content/uploads/setup-parameter-1.png?ssl=1"><img data-recalc-dims="1" loading="lazy" decoding="async" width="708" height="398" src="https://i0.wp.com/aderlab.com/wp-content/uploads/setup-parameter-1.png?resize=708%2C398&#038;ssl=1" alt="" class="wp-image-5149" srcset="https://i0.wp.com/aderlab.com/wp-content/uploads/setup-parameter-1.png?resize=1024%2C576&amp;ssl=1 1024w, https://i0.wp.com/aderlab.com/wp-content/uploads/setup-parameter-1.png?resize=300%2C169&amp;ssl=1 300w, https://i0.wp.com/aderlab.com/wp-content/uploads/setup-parameter-1.png?resize=768%2C432&amp;ssl=1 768w, https://i0.wp.com/aderlab.com/wp-content/uploads/setup-parameter-1.png?resize=1536%2C864&amp;ssl=1 1536w, https://i0.wp.com/aderlab.com/wp-content/uploads/setup-parameter-1.png?w=1801&amp;ssl=1 1801w, https://i0.wp.com/aderlab.com/wp-content/uploads/setup-parameter-1.png?w=1416&amp;ssl=1 1416w" sizes="auto, (max-width: 708px) 100vw, 708px" /></a></figure>



<h3 class="wp-block-heading">3. 透過計算欄位比對參數，設定每個參數對應的數據指標</h3>



<p>這一個步驟是關鍵步驟，在設定完參數清單後，我們還需要讓參數與欄位產生關聯，讓參數變成不同的值的時候，就對應到不同的數據指標，例如當我選到參數清單裡的「銷售額」時，我就預期可以對應到「Sales」這個數據指標，當我選到參數清單裡的「客戶數」時，我就預期可以對應到「Customer」這個數據指標，以此類推。</p>



<p>具體要怎麼做呢？我們先從建立一個計算欄位開始。一樣在左側空白處點擊右鍵，選擇「建立計算欄位&#8230;」</p>



<figure class="wp-block-image size-large"><a href="https://i0.wp.com/aderlab.com/wp-content/uploads/setup-calculation-1.png?ssl=1"><img data-recalc-dims="1" loading="lazy" decoding="async" width="708" height="398" src="https://i0.wp.com/aderlab.com/wp-content/uploads/setup-calculation-1.png?resize=708%2C398&#038;ssl=1" alt="" class="wp-image-5150" srcset="https://i0.wp.com/aderlab.com/wp-content/uploads/setup-calculation-1.png?resize=1024%2C576&amp;ssl=1 1024w, https://i0.wp.com/aderlab.com/wp-content/uploads/setup-calculation-1.png?resize=300%2C169&amp;ssl=1 300w, https://i0.wp.com/aderlab.com/wp-content/uploads/setup-calculation-1.png?resize=768%2C432&amp;ssl=1 768w, https://i0.wp.com/aderlab.com/wp-content/uploads/setup-calculation-1.png?resize=1536%2C864&amp;ssl=1 1536w, https://i0.wp.com/aderlab.com/wp-content/uploads/setup-calculation-1.png?w=1801&amp;ssl=1 1801w, https://i0.wp.com/aderlab.com/wp-content/uploads/setup-calculation-1.png?w=1416&amp;ssl=1 1416w" sizes="auto, (max-width: 708px) 100vw, 708px" /></a></figure>



<p>接著，我們來設定「計算欄位的內容」，讓參數清單可以與計算欄位產生連結，讓我們之後在切換「指標切換器」的這個參數時，就影響到欄位 「指標切換器」的計算欄位。</p>



<p>計算欄位公式：</p>



<p>if [參數].[指標切換器] = &#8216;銷售額&#8217; then [銷售額 (本月)]<br>elseif [參數].[指標切換器] = &#8216;銷售量&#8217; then [數量 (本月)]<br>elseif [參數].[指標切換器] = &#8216;利潤&#8217; then [利潤 (本月)]<br>elseif [參數].[指標切換器] = &#8216;訂單&#8217; then [訂單數 (本月)]<br>elseif [參數].[指標切換器] = &#8216;客戶數&#8217; then [客戶數 (本月)]<br>end</p>



<p>這段公式的意思是，當參數選到「銷售額」時，欄位就呈現「銷售額 (本月)」這個數據指標；當參數選到「銷售量」時，欄位就呈現「數量 (本月)」這個數據指標，以此類推。這樣就完成了參數與欄位的連結建立了。</p>



<figure class="wp-block-image size-large"><a href="https://i0.wp.com/aderlab.com/wp-content/uploads/setup-calculation.png?ssl=1"><img data-recalc-dims="1" loading="lazy" decoding="async" width="708" height="398" src="https://i0.wp.com/aderlab.com/wp-content/uploads/setup-calculation.png?resize=708%2C398&#038;ssl=1" alt="" class="wp-image-5151" srcset="https://i0.wp.com/aderlab.com/wp-content/uploads/setup-calculation.png?resize=1024%2C576&amp;ssl=1 1024w, https://i0.wp.com/aderlab.com/wp-content/uploads/setup-calculation.png?resize=300%2C169&amp;ssl=1 300w, https://i0.wp.com/aderlab.com/wp-content/uploads/setup-calculation.png?resize=768%2C432&amp;ssl=1 768w, https://i0.wp.com/aderlab.com/wp-content/uploads/setup-calculation.png?resize=1536%2C864&amp;ssl=1 1536w, https://i0.wp.com/aderlab.com/wp-content/uploads/setup-calculation.png?w=1801&amp;ssl=1 1801w, https://i0.wp.com/aderlab.com/wp-content/uploads/setup-calculation.png?w=1416&amp;ssl=1 1416w" sizes="auto, (max-width: 708px) 100vw, 708px" /></a></figure>



<h3 class="wp-block-heading">4. 把對應的欄位拉到欄與列：以城市為例</h3>



<p>把我們做好的「指標切換器」計算欄位拉到對應的「欄」，並且於圖表中顯示數值。</p>



<figure class="wp-block-image size-large is-resized"><a href="https://i0.wp.com/aderlab.com/wp-content/uploads/pull-column.png?ssl=1"><img data-recalc-dims="1" loading="lazy" decoding="async" src="https://i0.wp.com/aderlab.com/wp-content/uploads/pull-column.png?resize=708%2C398&#038;ssl=1" alt="" class="wp-image-5152" width="708" height="398" srcset="https://i0.wp.com/aderlab.com/wp-content/uploads/pull-column.png?resize=1024%2C576&amp;ssl=1 1024w, https://i0.wp.com/aderlab.com/wp-content/uploads/pull-column.png?resize=300%2C169&amp;ssl=1 300w, https://i0.wp.com/aderlab.com/wp-content/uploads/pull-column.png?resize=768%2C432&amp;ssl=1 768w, https://i0.wp.com/aderlab.com/wp-content/uploads/pull-column.png?resize=1536%2C864&amp;ssl=1 1536w, https://i0.wp.com/aderlab.com/wp-content/uploads/pull-column.png?w=1801&amp;ssl=1 1801w, https://i0.wp.com/aderlab.com/wp-content/uploads/pull-column.png?w=1416&amp;ssl=1 1416w" sizes="auto, (max-width: 708px) 100vw, 708px" /></a></figure>



<p>接著因為我們想要看到各個城市的各個數據指標，所以接著需要再把「City」的維度拉到「列」，就初步完成了城市的銷售額長條圖。這時候，我建議先不要急著往下一個步驟前進，在前往下一個步驟之前，我們先檢查看看「指標切換器」的參數有沒有設定成功。</p>



<p>什麼情況下會失敗呢？通常是我們在寫計算欄位的公式時，可能在參數對應的名稱寫錯名稱，包括打錯字、多打一個空格等都是常常會有的錯誤原因。這時候我們可以來檢查看看，當我們在選擇不同參數值時，圖表的數值是否有變化。</p>



<figure class="wp-block-image size-large"><a href="https://i0.wp.com/aderlab.com/wp-content/uploads/pull-column-1.png?ssl=1"><img data-recalc-dims="1" loading="lazy" decoding="async" width="708" height="398" src="https://i0.wp.com/aderlab.com/wp-content/uploads/pull-column-1.png?resize=708%2C398&#038;ssl=1" alt="" class="wp-image-5153" srcset="https://i0.wp.com/aderlab.com/wp-content/uploads/pull-column-1.png?resize=1024%2C576&amp;ssl=1 1024w, https://i0.wp.com/aderlab.com/wp-content/uploads/pull-column-1.png?resize=300%2C169&amp;ssl=1 300w, https://i0.wp.com/aderlab.com/wp-content/uploads/pull-column-1.png?resize=768%2C432&amp;ssl=1 768w, https://i0.wp.com/aderlab.com/wp-content/uploads/pull-column-1.png?resize=1536%2C864&amp;ssl=1 1536w, https://i0.wp.com/aderlab.com/wp-content/uploads/pull-column-1.png?w=1801&amp;ssl=1 1801w, https://i0.wp.com/aderlab.com/wp-content/uploads/pull-column-1.png?w=1416&amp;ssl=1 1416w" sizes="auto, (max-width: 708px) 100vw, 708px" /></a></figure>



<p>那麼參數的指標切換器要怎麼顯示呢？我們可以在左側參數區的「指標切換器」點選右鍵，接著按下「顯示參數」，參數切換器的切換按鈕就會出現在右側了。</p>



<figure class="wp-block-image size-large"><a href="https://i0.wp.com/aderlab.com/wp-content/uploads/show-parameter.png?ssl=1"><img data-recalc-dims="1" loading="lazy" decoding="async" width="708" height="398" src="https://i0.wp.com/aderlab.com/wp-content/uploads/show-parameter.png?resize=708%2C398&#038;ssl=1" alt="" class="wp-image-5154" srcset="https://i0.wp.com/aderlab.com/wp-content/uploads/show-parameter.png?resize=1024%2C576&amp;ssl=1 1024w, https://i0.wp.com/aderlab.com/wp-content/uploads/show-parameter.png?resize=300%2C169&amp;ssl=1 300w, https://i0.wp.com/aderlab.com/wp-content/uploads/show-parameter.png?resize=768%2C432&amp;ssl=1 768w, https://i0.wp.com/aderlab.com/wp-content/uploads/show-parameter.png?resize=1536%2C864&amp;ssl=1 1536w, https://i0.wp.com/aderlab.com/wp-content/uploads/show-parameter.png?w=1801&amp;ssl=1 1801w, https://i0.wp.com/aderlab.com/wp-content/uploads/show-parameter.png?w=1416&amp;ssl=1 1416w" sizes="auto, (max-width: 708px) 100vw, 708px" /></a></figure>



<h3 class="wp-block-heading">5. Top 集合設定</h3>



<p>在欄位拉選時的預設排序會是依照A-Z的排序，所以你會發現City會依照A開頭的城市往下排。但這可能不是我們想要的結果，因為城市的數量太多了，所以你會發現如果照預設排序的話，我們沒辦法看到最高或最低的銷售城市是哪些，這時候我們可以有幾種調整的作法：</p>



<p>1. 更改成依照「參數指標器」選定的數值排序</p>



<p>我們可以在放在列的「City」上點右鍵，接著選擇「排序」。</p>



<figure class="wp-block-image size-large"><a href="https://i0.wp.com/aderlab.com/wp-content/uploads/sort.png?ssl=1"><img data-recalc-dims="1" loading="lazy" decoding="async" width="708" height="398" src="https://i0.wp.com/aderlab.com/wp-content/uploads/sort.png?resize=708%2C398&#038;ssl=1" alt="" class="wp-image-5164" srcset="https://i0.wp.com/aderlab.com/wp-content/uploads/sort.png?resize=1024%2C576&amp;ssl=1 1024w, https://i0.wp.com/aderlab.com/wp-content/uploads/sort.png?resize=300%2C169&amp;ssl=1 300w, https://i0.wp.com/aderlab.com/wp-content/uploads/sort.png?resize=768%2C432&amp;ssl=1 768w, https://i0.wp.com/aderlab.com/wp-content/uploads/sort.png?resize=1536%2C864&amp;ssl=1 1536w, https://i0.wp.com/aderlab.com/wp-content/uploads/sort.png?w=1801&amp;ssl=1 1801w, https://i0.wp.com/aderlab.com/wp-content/uploads/sort.png?w=1416&amp;ssl=1 1416w" sizes="auto, (max-width: 708px) 100vw, 708px" /></a></figure>



<p>接著，再將「排序依據」改成「欄位」，欄位名稱選擇「指標切換器」，這樣就可以確保在使用參數切換數據指標時，排序也會依照選定的數據指標來排序，至於排序是要選遞增還是遞減，就看你的報表使用需求決定囉。</p>



<p>做到這裡，如果你想要再精簡一點，只想看到前幾名的 City是哪些，那麼就可以接續下一個步驟，再以集合設定的方式篩選前幾名的城市。</p>



<figure class="wp-block-image size-large"><a href="https://i0.wp.com/aderlab.com/wp-content/uploads/sortbyfield.png?ssl=1"><img data-recalc-dims="1" loading="lazy" decoding="async" width="708" height="398" src="https://i0.wp.com/aderlab.com/wp-content/uploads/sortbyfield.png?resize=708%2C398&#038;ssl=1" alt="" class="wp-image-5165" srcset="https://i0.wp.com/aderlab.com/wp-content/uploads/sortbyfield.png?resize=1024%2C576&amp;ssl=1 1024w, https://i0.wp.com/aderlab.com/wp-content/uploads/sortbyfield.png?resize=300%2C169&amp;ssl=1 300w, https://i0.wp.com/aderlab.com/wp-content/uploads/sortbyfield.png?resize=768%2C432&amp;ssl=1 768w, https://i0.wp.com/aderlab.com/wp-content/uploads/sortbyfield.png?resize=1536%2C864&amp;ssl=1 1536w, https://i0.wp.com/aderlab.com/wp-content/uploads/sortbyfield.png?w=1801&amp;ssl=1 1801w, https://i0.wp.com/aderlab.com/wp-content/uploads/sortbyfield.png?w=1416&amp;ssl=1 1416w" sizes="auto, (max-width: 708px) 100vw, 708px" /></a></figure>



<p>2. 利用集合篩選出TOP的城市</p>



<p>假設我們想要挑選的是 City，那麼我們就可以在左側先找到 City 這個欄位，接著在這個欄位按右鍵，點選「建立」、「集合&#8230;」，就可以打開集合設定的畫面了。</p>



<figure class="wp-block-image size-large"><a href="https://i0.wp.com/aderlab.com/wp-content/uploads/set.png?ssl=1"><img data-recalc-dims="1" loading="lazy" decoding="async" width="708" height="398" src="https://i0.wp.com/aderlab.com/wp-content/uploads/set.png?resize=708%2C398&#038;ssl=1" alt="" class="wp-image-5166" srcset="https://i0.wp.com/aderlab.com/wp-content/uploads/set.png?resize=1024%2C576&amp;ssl=1 1024w, https://i0.wp.com/aderlab.com/wp-content/uploads/set.png?resize=300%2C169&amp;ssl=1 300w, https://i0.wp.com/aderlab.com/wp-content/uploads/set.png?resize=768%2C432&amp;ssl=1 768w, https://i0.wp.com/aderlab.com/wp-content/uploads/set.png?resize=1536%2C864&amp;ssl=1 1536w, https://i0.wp.com/aderlab.com/wp-content/uploads/set.png?w=1801&amp;ssl=1 1801w, https://i0.wp.com/aderlab.com/wp-content/uploads/set.png?w=1416&amp;ssl=1 1416w" sizes="auto, (max-width: 708px) 100vw, 708px" /></a></figure>



<p>接著，集合的條件設定有很多類型，這篇文章用的是「頂端」的選項，頂端的選擇適用於你想要找到前幾名或最後幾名的資料。至於要一哪個欄位來判斷前幾名，我們一樣選擇「指標篩選器」，這樣集合找到的城市才會在指標變化時同步以最新選定的指標找到 Top 或是 Bottom 的維度資料。</p>



<figure class="wp-block-image size-large"><a href="https://i0.wp.com/aderlab.com/wp-content/uploads/set-1-1.png?ssl=1"><img data-recalc-dims="1" loading="lazy" decoding="async" width="708" height="398" src="https://i0.wp.com/aderlab.com/wp-content/uploads/set-1-1.png?resize=708%2C398&#038;ssl=1" alt="" class="wp-image-5170" srcset="https://i0.wp.com/aderlab.com/wp-content/uploads/set-1-1.png?resize=1024%2C576&amp;ssl=1 1024w, https://i0.wp.com/aderlab.com/wp-content/uploads/set-1-1.png?resize=300%2C169&amp;ssl=1 300w, https://i0.wp.com/aderlab.com/wp-content/uploads/set-1-1.png?resize=768%2C432&amp;ssl=1 768w, https://i0.wp.com/aderlab.com/wp-content/uploads/set-1-1.png?resize=1536%2C864&amp;ssl=1 1536w, https://i0.wp.com/aderlab.com/wp-content/uploads/set-1-1.png?w=1801&amp;ssl=1 1801w, https://i0.wp.com/aderlab.com/wp-content/uploads/set-1-1.png?w=1416&amp;ssl=1 1416w" sizes="auto, (max-width: 708px) 100vw, 708px" /></a></figure>



<p>最後一個步驟，我們把做好的集合，拉到篩選條件的空白處，這樣就完成了Top 5 的城市長條圖了，至於 Top 5 的產品次分類長條圖也是一樣的作法，只要把集合欄位從 City 改成 Sub-Category就可以了</p>



<p>那麼 Tableau 的進階應用就分享到這裡啦，如果對於這份報表最上方的MOM%、YOY%、YTM%的設定有興趣，歡迎參考上一篇 <a href="https://aderlab.com/data-analytics/tableau-date-compared-advanced">Tableau 進階應用：做出MOM、YOY、YTD互動式報表</a>，裡面會有更詳細的設定介紹。下一篇會再延續這份報表，分享如何設定顯示/隱藏的報表按鈕以及動態更改圖表標題，下篇文章見：）</p>



<p>文章的最後一樣提供這份儀表板使用的資源供參考：<a href="https://docs.google.com/spreadsheets/d/13Llu9MCSmxgQ4y3f-lxls5cKJOfQhjt6/edit?usp=share_link&amp;ouid=111222713116215854465&amp;rtpof=true&amp;sd=true" target="_blank" rel="noreferrer noopener">Sample &#8211; Superstore</a>。</p>



<p class="has-text-align-right">Sharon</p>



<hr class="wp-block-separator has-alpha-channel-opacity is-style-wide"/>



<p class="has-medium-font-size"><strong>Buy me a coffee&nbsp; 用行動支持我的內容創作</strong></p>



<p><em>如果我的文章對你有幫助，歡迎用行動支持我的內容創作，小額贊助請我喝咖啡、留言或是寄信來跟我分享你的收穫，都會讓我持續有動力分享更多內容唷～</em></p>



<div class="wp-block-buttons is-layout-flex wp-block-buttons-is-layout-flex">
<div class="wp-block-button aligncenter is-style-fill"><a class="wp-block-button__link has-black-color has-luminous-vivid-amber-background-color has-text-color has-background wp-element-button" href="https://www.buymeacoffee.com/aderlabsharon" target="_blank" rel="noreferrer noopener">以小額贊助支持Sharon</a></div>
</div>
<p>這篇文章 <a href="https://aderlab.com/data-analytics/tableau-dynamic-indicators/">【Tableau 進階教學】動態切換圖表數據指標</a> 最早出現於 <a href="https://aderlab.com">Sharon Lab∣雪倫實驗室</a>。</p>
]]></content:encoded>
					
		
		<enclosure url="https://aderlab.com/wp-content/uploads/tableau-advance-video-1.mov" length="33600267" type="video/quicktime" />

		<post-id xmlns="com-wordpress:feed-additions:1">5146</post-id>	</item>
		<item>
		<title>【Tableau 教學】折線圖設計技巧2：折線圖疊圖與延伸圖表教學</title>
		<link>https://aderlab.com/data-analytics/tableau-line-2/</link>
		
		<dc:creator><![CDATA[Sharon]]></dc:creator>
		<pubDate>Sat, 01 Jul 2023 01:00:00 +0000</pubDate>
				<category><![CDATA[Tableau]]></category>
		<category><![CDATA[數據分析]]></category>
		<guid isPermaLink="false">https://aderlab.com/?p=5083</guid>

					<description><![CDATA[<p>上一篇聊完如何在 Tableau 做出折線圖，以及折線圖的基本設定方式，這一篇持續談談折線圖這個主題，來聊聊這個圖表的進階設定與搭配用法，那就開始囉！ 如何在T&#8230;</p>
<p><a href="https://aderlab.com/data-analytics/tableau-line-2/" class="btn-continue">繼續閱讀<span class="arrow-continue">&#8594;</span></a></p>
<p>這篇文章 <a href="https://aderlab.com/data-analytics/tableau-line-2/">【Tableau 教學】折線圖設計技巧2：折線圖疊圖與延伸圖表教學</a> 最早出現於 <a href="https://aderlab.com">Sharon Lab∣雪倫實驗室</a>。</p>
]]></description>
										<content:encoded><![CDATA[
<p>上一篇聊完如何在 Tableau 做出折線圖，以及折線圖的基本設定方式，這一篇持續談談折線圖這個主題，來聊聊這個圖表的進階設定與搭配用法，那就開始囉！</p>



<h2 class="wp-block-heading">如何在Tableau做出折線圖疊圖效果？ </h2>



<p>如果想要在Tableau做出兩條折線圖疊放在同一個畫面的效果可不可以呢？答案當然是可以的，我們可以使用「雙軸」的功能達到疊圖的效果。例如說，我想做出銷售量以及銷售額的每月折線圖，那麼我們就可以採取下列的操作步驟。</p>



<p>步驟1：選擇適合的日期維度與度量 </p>



<p>將日期以及要做成折線圖的兩個度量放到欄與列的位置</p>



<figure class="wp-block-image size-large"><a href="https://i0.wp.com/aderlab.com/wp-content/uploads/line-chart.jpg?ssl=1"><img data-recalc-dims="1" loading="lazy" decoding="async" width="708" height="398" src="https://i0.wp.com/aderlab.com/wp-content/uploads/line-chart.jpg?resize=708%2C398&#038;ssl=1" alt="" class="wp-image-5084" srcset="https://i0.wp.com/aderlab.com/wp-content/uploads/line-chart.jpg?resize=1024%2C576&amp;ssl=1 1024w, https://i0.wp.com/aderlab.com/wp-content/uploads/line-chart.jpg?resize=300%2C169&amp;ssl=1 300w, https://i0.wp.com/aderlab.com/wp-content/uploads/line-chart.jpg?resize=768%2C432&amp;ssl=1 768w, https://i0.wp.com/aderlab.com/wp-content/uploads/line-chart.jpg?resize=1536%2C864&amp;ssl=1 1536w, https://i0.wp.com/aderlab.com/wp-content/uploads/line-chart.jpg?w=1801&amp;ssl=1 1801w, https://i0.wp.com/aderlab.com/wp-content/uploads/line-chart.jpg?w=1416&amp;ssl=1 1416w" sizes="auto, (max-width: 708px) 100vw, 708px" /></a></figure>



<p>步驟2：選擇「雙線」的圖表效果 </p>



<p>接著再點選畫面右上方的「顯示」，選擇「雙線」，就完成了同時在畫面呈現兩條折線圖了。</p>



<figure class="wp-block-image size-large"><a href="https://i0.wp.com/aderlab.com/wp-content/uploads/line-chart-1.jpg?ssl=1"><img data-recalc-dims="1" loading="lazy" decoding="async" width="708" height="398" src="https://i0.wp.com/aderlab.com/wp-content/uploads/line-chart-1.jpg?resize=708%2C398&#038;ssl=1" alt="" class="wp-image-5085" srcset="https://i0.wp.com/aderlab.com/wp-content/uploads/line-chart-1.jpg?resize=1024%2C576&amp;ssl=1 1024w, https://i0.wp.com/aderlab.com/wp-content/uploads/line-chart-1.jpg?resize=300%2C169&amp;ssl=1 300w, https://i0.wp.com/aderlab.com/wp-content/uploads/line-chart-1.jpg?resize=768%2C432&amp;ssl=1 768w, https://i0.wp.com/aderlab.com/wp-content/uploads/line-chart-1.jpg?resize=1536%2C864&amp;ssl=1 1536w, https://i0.wp.com/aderlab.com/wp-content/uploads/line-chart-1.jpg?w=1801&amp;ssl=1 1801w, https://i0.wp.com/aderlab.com/wp-content/uploads/line-chart-1.jpg?w=1416&amp;ssl=1 1416w" sizes="auto, (max-width: 708px) 100vw, 708px" /></a></figure>



<p>不過實務上，我們可能有時候需要雙軸，有時候又不需要，這時候該怎麼任意切換成適合的圖表呢？一種作法是我們一樣在右上方的「顯示」更改成其他的折線圖樣式，另一種則是我自己比較常用的「利用右鍵選項切換雙軸」，做法非常簡單，我們只要在第二個度量點選右鍵，接著就會在右鍵點出來的選單中看到「雙軸」，如果有勾選就代表目前的圖表使用了雙軸，想要取消的話就再按一次雙軸就可以了。</p>



<p>那麼，什麼叫做第二個度量呢？以圖片的範例來說，我們看到 Sales放在 Quantity 的後面，所以第二個是指以位置來的第幾位，我可以選擇在列的位置，右鍵點選「總和(Sales)」，也可以在下方圖表的Y軸Sales區塊點選右鍵，兩個位置都可以叫出「雙軸」的設定。</p>



<figure class="wp-block-image size-large"><a href="https://i0.wp.com/aderlab.com/wp-content/uploads/line-chart-2.jpg?ssl=1"><img data-recalc-dims="1" loading="lazy" decoding="async" width="708" height="398" src="https://i0.wp.com/aderlab.com/wp-content/uploads/line-chart-2.jpg?resize=708%2C398&#038;ssl=1" alt="" class="wp-image-5086" srcset="https://i0.wp.com/aderlab.com/wp-content/uploads/line-chart-2.jpg?resize=1024%2C576&amp;ssl=1 1024w, https://i0.wp.com/aderlab.com/wp-content/uploads/line-chart-2.jpg?resize=300%2C169&amp;ssl=1 300w, https://i0.wp.com/aderlab.com/wp-content/uploads/line-chart-2.jpg?resize=768%2C432&amp;ssl=1 768w, https://i0.wp.com/aderlab.com/wp-content/uploads/line-chart-2.jpg?resize=1536%2C864&amp;ssl=1 1536w, https://i0.wp.com/aderlab.com/wp-content/uploads/line-chart-2.jpg?w=1801&amp;ssl=1 1801w, https://i0.wp.com/aderlab.com/wp-content/uploads/line-chart-2.jpg?w=1416&amp;ssl=1 1416w" sizes="auto, (max-width: 708px) 100vw, 708px" /></a></figure>



<figure class="wp-block-image size-large"><a href="https://i0.wp.com/aderlab.com/wp-content/uploads/line-chart-3.jpg?ssl=1"><img data-recalc-dims="1" loading="lazy" decoding="async" width="708" height="398" src="https://i0.wp.com/aderlab.com/wp-content/uploads/line-chart-3.jpg?resize=708%2C398&#038;ssl=1" alt="" class="wp-image-5087" srcset="https://i0.wp.com/aderlab.com/wp-content/uploads/line-chart-3.jpg?resize=1024%2C576&amp;ssl=1 1024w, https://i0.wp.com/aderlab.com/wp-content/uploads/line-chart-3.jpg?resize=300%2C169&amp;ssl=1 300w, https://i0.wp.com/aderlab.com/wp-content/uploads/line-chart-3.jpg?resize=768%2C432&amp;ssl=1 768w, https://i0.wp.com/aderlab.com/wp-content/uploads/line-chart-3.jpg?resize=1536%2C864&amp;ssl=1 1536w, https://i0.wp.com/aderlab.com/wp-content/uploads/line-chart-3.jpg?w=1801&amp;ssl=1 1801w, https://i0.wp.com/aderlab.com/wp-content/uploads/line-chart-3.jpg?w=1416&amp;ssl=1 1416w" sizes="auto, (max-width: 708px) 100vw, 708px" /></a></figure>



<p>設定雙軸的時候唯一需要注意的是，我們一定要選到第二個度量，才會出現「雙軸」的選項，如果點選第一個度量的話，不論再怎麼點選右鍵，都不會看到「雙軸」的選項，這是設定過程中最需要注意的小細節。</p>



<p>不過使用雙軸來呈現數據時，還是需要非常留意左側軸以及右側軸的呈現，以及兩條折線圖疊在一起呈現會不會容易造成誤解。以這張折線圖疊圖為例，這張圖乍看之下會覺得 Quantity 和 Sales 的數量是一樣的，因為兩條線幾乎疊在一起，如果沒有細部去看左右側的軸就很容易造成誤解。</p>



<p>另外，哪一條線對照哪一個軸也是實務上常常會造成雙軸折線圖解讀困擾的問題之一，在沒有好好解釋或是標註的情況下，都很容易在簡報時被提出疑問。</p>



<figure class="wp-block-image size-large"><img data-recalc-dims="1" loading="lazy" decoding="async" width="708" height="398" src="https://i0.wp.com/aderlab.com/wp-content/uploads/line-chart-9.jpg?resize=708%2C398&#038;ssl=1" alt="" class="wp-image-5103" srcset="https://i0.wp.com/aderlab.com/wp-content/uploads/line-chart-9.jpg?resize=1024%2C576&amp;ssl=1 1024w, https://i0.wp.com/aderlab.com/wp-content/uploads/line-chart-9.jpg?resize=300%2C169&amp;ssl=1 300w, https://i0.wp.com/aderlab.com/wp-content/uploads/line-chart-9.jpg?resize=768%2C432&amp;ssl=1 768w, https://i0.wp.com/aderlab.com/wp-content/uploads/line-chart-9.jpg?resize=1536%2C864&amp;ssl=1 1536w, https://i0.wp.com/aderlab.com/wp-content/uploads/line-chart-9.jpg?w=1801&amp;ssl=1 1801w, https://i0.wp.com/aderlab.com/wp-content/uploads/line-chart-9.jpg?w=1416&amp;ssl=1 1416w" sizes="auto, (max-width: 708px) 100vw, 708px" /></figure>



<p>如果要避免上述的困擾發生，我們有三種可以參考的解決方案：</p>



<p>1. 讓雙軸的刻度線一致<br>意思是讓左右兩邊的數值都是一樣的起始點以及一樣的間距，這樣在看圖表時，就不需要刻意比對哪一條線對照哪一邊的軸，就可以直接看出兩條線的趨勢與相對數值差異。</p>



<p>設定方法是任意選擇一邊的軸的範圍，接著點選右鍵，就可以點選「同步軸」讓左右兩軸的刻度一樣。</p>



<figure class="wp-block-image size-large"><a href="https://i0.wp.com/aderlab.com/wp-content/uploads/line-chart-4.jpg?ssl=1"><img data-recalc-dims="1" loading="lazy" decoding="async" width="708" height="398" src="https://i0.wp.com/aderlab.com/wp-content/uploads/line-chart-4.jpg?resize=708%2C398&#038;ssl=1" alt="" class="wp-image-5093" srcset="https://i0.wp.com/aderlab.com/wp-content/uploads/line-chart-4.jpg?resize=1024%2C576&amp;ssl=1 1024w, https://i0.wp.com/aderlab.com/wp-content/uploads/line-chart-4.jpg?resize=300%2C169&amp;ssl=1 300w, https://i0.wp.com/aderlab.com/wp-content/uploads/line-chart-4.jpg?resize=768%2C432&amp;ssl=1 768w, https://i0.wp.com/aderlab.com/wp-content/uploads/line-chart-4.jpg?resize=1536%2C864&amp;ssl=1 1536w, https://i0.wp.com/aderlab.com/wp-content/uploads/line-chart-4.jpg?w=1801&amp;ssl=1 1801w, https://i0.wp.com/aderlab.com/wp-content/uploads/line-chart-4.jpg?w=1416&amp;ssl=1 1416w" sizes="auto, (max-width: 708px) 100vw, 708px" /></a></figure>



<p>不過這種作法只適合用在兩個度量的數值差異不大的時候，假設兩個數值間的差異太大，例如這篇文章示範的 Sales 跟 Quantity，Quantity 的數值相對 Sales 小很多，所以 Quantity 的折線圖在同步軸之後，就幾乎變成一條平行線，也就看不出月份間的 Quantity 差異了。</p>



<figure class="wp-block-image size-large"><a href="https://i0.wp.com/aderlab.com/wp-content/uploads/line-chart-3-1.jpg?ssl=1"><img data-recalc-dims="1" loading="lazy" decoding="async" width="708" height="398" src="https://i0.wp.com/aderlab.com/wp-content/uploads/line-chart-3-1.jpg?resize=708%2C398&#038;ssl=1" alt="" class="wp-image-5092" srcset="https://i0.wp.com/aderlab.com/wp-content/uploads/line-chart-3-1.jpg?resize=1024%2C576&amp;ssl=1 1024w, https://i0.wp.com/aderlab.com/wp-content/uploads/line-chart-3-1.jpg?resize=300%2C169&amp;ssl=1 300w, https://i0.wp.com/aderlab.com/wp-content/uploads/line-chart-3-1.jpg?resize=768%2C432&amp;ssl=1 768w, https://i0.wp.com/aderlab.com/wp-content/uploads/line-chart-3-1.jpg?resize=1536%2C864&amp;ssl=1 1536w, https://i0.wp.com/aderlab.com/wp-content/uploads/line-chart-3-1.jpg?w=1801&amp;ssl=1 1801w, https://i0.wp.com/aderlab.com/wp-content/uploads/line-chart-3-1.jpg?w=1416&amp;ssl=1 1416w" sizes="auto, (max-width: 708px) 100vw, 708px" /></a></figure>



<p>2. 在折線圖上標註絕對數字</p>



<p>如果數值差異很大，不適合用「同步軸」的話，我們還可以選擇第二種以及第三種作法。第二種作法是直接將兩條折線圖的相關度量名稱、度量數值都標註到圖表上，如此一來，即便不去看對應的Y軸，也可以一目瞭然的知道哪條線是表達哪個度量，以及度量的數值。</p>



<figure class="wp-block-image size-large"><a href="https://i0.wp.com/aderlab.com/wp-content/uploads/line-chart-5.jpg?ssl=1"><img data-recalc-dims="1" loading="lazy" decoding="async" width="708" height="398" src="https://i0.wp.com/aderlab.com/wp-content/uploads/line-chart-5.jpg?resize=708%2C398&#038;ssl=1" alt="" class="wp-image-5094" srcset="https://i0.wp.com/aderlab.com/wp-content/uploads/line-chart-5.jpg?resize=1024%2C576&amp;ssl=1 1024w, https://i0.wp.com/aderlab.com/wp-content/uploads/line-chart-5.jpg?resize=300%2C169&amp;ssl=1 300w, https://i0.wp.com/aderlab.com/wp-content/uploads/line-chart-5.jpg?resize=768%2C432&amp;ssl=1 768w, https://i0.wp.com/aderlab.com/wp-content/uploads/line-chart-5.jpg?resize=1536%2C864&amp;ssl=1 1536w, https://i0.wp.com/aderlab.com/wp-content/uploads/line-chart-5.jpg?w=1801&amp;ssl=1 1801w, https://i0.wp.com/aderlab.com/wp-content/uploads/line-chart-5.jpg?w=1416&amp;ssl=1 1416w" sizes="auto, (max-width: 708px) 100vw, 708px" /></a></figure>



<p>這種作法適用於圖表有足夠多呈現標籤的空間，以及資料量(日期區間)沒有很長的時候，因為一旦顯示的月份數愈長，就愈不適合將所有的數值都顯示出來，因為視覺上會看起來密密麻麻的，非常不容易解讀。於是，我們還有第三種方法可以選擇，哪就是讓折線圖搭配其他圖表一起使用。</p>



<p>3. 將圖表改成折線圖搭配長條圖的圖表呈現</p>



<p>最後一種建議作法是，我們可以把其中一條折線圖改長條圖呈現，如下圖所示。變換的作法也非常容易，我們只要在有上方的「顯示」，將圖表類型改成「雙組合」就可以了。</p>



<figure class="wp-block-image size-large"><a href="https://i0.wp.com/aderlab.com/wp-content/uploads/line-chart-6.jpg?ssl=1"><img data-recalc-dims="1" loading="lazy" decoding="async" width="708" height="398" src="https://i0.wp.com/aderlab.com/wp-content/uploads/line-chart-6.jpg?resize=708%2C398&#038;ssl=1" alt="" class="wp-image-5095" srcset="https://i0.wp.com/aderlab.com/wp-content/uploads/line-chart-6.jpg?resize=1024%2C576&amp;ssl=1 1024w, https://i0.wp.com/aderlab.com/wp-content/uploads/line-chart-6.jpg?resize=300%2C169&amp;ssl=1 300w, https://i0.wp.com/aderlab.com/wp-content/uploads/line-chart-6.jpg?resize=768%2C432&amp;ssl=1 768w, https://i0.wp.com/aderlab.com/wp-content/uploads/line-chart-6.jpg?resize=1536%2C864&amp;ssl=1 1536w, https://i0.wp.com/aderlab.com/wp-content/uploads/line-chart-6.jpg?w=1801&amp;ssl=1 1801w, https://i0.wp.com/aderlab.com/wp-content/uploads/line-chart-6.jpg?w=1416&amp;ssl=1 1416w" sizes="auto, (max-width: 708px) 100vw, 708px" /></a></figure>



<h2 class="wp-block-heading">與折線圖類似的圖表：區域面積圖</h2>



<p>折線圖的最後我們來談談和折線圖很類似，也非常好使用的區域面積圖。這個圖和折線圖不一樣的是，區域圖除了呈現趨勢之外，還可以呈現累積的組成，這麼說可能有點抽象，我們舉個例子來說明。</p>



<p>假設我想知道各個產品分類的銷售趨勢，我們可以使用折線圖或是區域面積圖，都能呈現出趨勢，但呈現出趨勢的效果不太一樣。</p>



<p>折線圖是將不同的產品品類的銷售額直接拆開，所有的品類都從Y軸的起點開始計算，好處是可以一眼就看出每個時間區段，哪個產品品類的銷售額最高，但缺點就是無法一眼看出當季的銷售額總額。</p>



<figure class="wp-block-image size-large"><a href="https://i0.wp.com/aderlab.com/wp-content/uploads/line-chart-8.jpg?ssl=1"><img data-recalc-dims="1" loading="lazy" decoding="async" width="708" height="398" src="https://i0.wp.com/aderlab.com/wp-content/uploads/line-chart-8.jpg?resize=708%2C398&#038;ssl=1" alt="" class="wp-image-5099" srcset="https://i0.wp.com/aderlab.com/wp-content/uploads/line-chart-8.jpg?resize=1024%2C576&amp;ssl=1 1024w, https://i0.wp.com/aderlab.com/wp-content/uploads/line-chart-8.jpg?resize=300%2C169&amp;ssl=1 300w, https://i0.wp.com/aderlab.com/wp-content/uploads/line-chart-8.jpg?resize=768%2C432&amp;ssl=1 768w, https://i0.wp.com/aderlab.com/wp-content/uploads/line-chart-8.jpg?resize=1536%2C864&amp;ssl=1 1536w, https://i0.wp.com/aderlab.com/wp-content/uploads/line-chart-8.jpg?w=1801&amp;ssl=1 1801w, https://i0.wp.com/aderlab.com/wp-content/uploads/line-chart-8.jpg?w=1416&amp;ssl=1 1416w" sizes="auto, (max-width: 708px) 100vw, 708px" /></a></figure>



<p>至於區域面積圖則是以累計來呈現整體趨勢，可以看出不同季度銷售額的產品組成，以及當季的銷售額總額高低。</p>



<figure class="wp-block-image size-large"><a href="https://i0.wp.com/aderlab.com/wp-content/uploads/line-chart-7-1.jpg?ssl=1"><img data-recalc-dims="1" loading="lazy" decoding="async" width="708" height="398" src="https://i0.wp.com/aderlab.com/wp-content/uploads/line-chart-7-1.jpg?resize=708%2C398&#038;ssl=1" alt="" class="wp-image-5098" srcset="https://i0.wp.com/aderlab.com/wp-content/uploads/line-chart-7-1.jpg?resize=1024%2C576&amp;ssl=1 1024w, https://i0.wp.com/aderlab.com/wp-content/uploads/line-chart-7-1.jpg?resize=300%2C169&amp;ssl=1 300w, https://i0.wp.com/aderlab.com/wp-content/uploads/line-chart-7-1.jpg?resize=768%2C432&amp;ssl=1 768w, https://i0.wp.com/aderlab.com/wp-content/uploads/line-chart-7-1.jpg?resize=1536%2C864&amp;ssl=1 1536w, https://i0.wp.com/aderlab.com/wp-content/uploads/line-chart-7-1.jpg?w=1801&amp;ssl=1 1801w, https://i0.wp.com/aderlab.com/wp-content/uploads/line-chart-7-1.jpg?w=1416&amp;ssl=1 1416w" sizes="auto, (max-width: 708px) 100vw, 708px" /></a></figure>



<p>至於要使用哪個圖表，就看你想強調的是各品類之間的銷售額高低差異，還是各季別的銷售額總和以及銷售額組成囉，這也是數據分析師的價值，就是要找出適合的數據、適合的圖表，來表達我們想傳遞出來的數據價值，那麼關於 Tableau的折線圖就分享到這裡拉，希望對大家有幫助，我們下篇文章見～</p>



<p class="has-text-align-right">Sharon</p>



<hr class="wp-block-separator has-alpha-channel-opacity is-style-wide"/>



<p class="has-medium-font-size"><strong>Buy me a coffee&nbsp; 用行動支持我的內容創作</strong></p>



<p><em>如果我的文章對你有幫助，歡迎用行動支持我的內容創作，小額贊助請我喝咖啡、留言或是寄信來跟我分享你的收穫，都會讓我持續有動力分享更多內容唷～</em></p>



<div class="wp-block-buttons is-layout-flex wp-block-buttons-is-layout-flex">
<div class="wp-block-button aligncenter is-style-fill"><a class="wp-block-button__link has-black-color has-luminous-vivid-amber-background-color has-text-color has-background wp-element-button" href="https://www.buymeacoffee.com/aderlabsharon" target="_blank" rel="noreferrer noopener">以小額贊助支持Sharon</a></div>
</div>
<p>這篇文章 <a href="https://aderlab.com/data-analytics/tableau-line-2/">【Tableau 教學】折線圖設計技巧2：折線圖疊圖與延伸圖表教學</a> 最早出現於 <a href="https://aderlab.com">Sharon Lab∣雪倫實驗室</a>。</p>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">5083</post-id>	</item>
		<item>
		<title>【Tableau 教學】折線圖設計技巧1：做出折線圖與基礎設定教學</title>
		<link>https://aderlab.com/data-analytics/tableau-line-1/</link>
		
		<dc:creator><![CDATA[Sharon]]></dc:creator>
		<pubDate>Sat, 24 Jun 2023 01:00:00 +0000</pubDate>
				<category><![CDATA[Tableau]]></category>
		<category><![CDATA[數據分析]]></category>
		<guid isPermaLink="false">https://aderlab.com/?p=5049</guid>

					<description><![CDATA[<p>這一篇來談談「折線圖」，這個圖表相信大家也不陌生，當我們看資料趨勢時，折線圖就是一個非常適合的圖表。例如，在做了產品功能改變後，利用折線圖檢測相關指標有沒有提升&#8230;</p>
<p><a href="https://aderlab.com/data-analytics/tableau-line-1/" class="btn-continue">繼續閱讀<span class="arrow-continue">&#8594;</span></a></p>
<p>這篇文章 <a href="https://aderlab.com/data-analytics/tableau-line-1/">【Tableau 教學】折線圖設計技巧1：做出折線圖與基礎設定教學</a> 最早出現於 <a href="https://aderlab.com">Sharon Lab∣雪倫實驗室</a>。</p>
]]></description>
										<content:encoded><![CDATA[
<p>這一篇來談談「折線圖」，這個圖表相信大家也不陌生，當我們看資料趨勢時，折線圖就是一個非常適合的圖表。例如，在做了產品功能改變後，利用折線圖檢測相關指標有沒有提升；又或者，我們想知道今年與去年的營收差異，也很適合將兩個年份的營收折線圖疊在一起看，不僅可以看到年度的月份營收差異，還可以同時看到去年同期的營收做比較，此外，折線圖也能用來預測未來的資料趨勢。這篇文章會分享如何在 Tableau 做出折線圖，以及基礎的折線圖設計技巧。</p>



<h2 class="wp-block-heading">如何在 Tableau 做出折線圖</h2>



<p>在 Tableau 做任何圖表之前，都可以先從右上角的「顯示」欄位看到每個圖示必要的欄位與指標有哪些，具體的作法是點開來之後，再將滑鼠游標移到想要知道的圖式，下方出現這個圖表必要的資料欄位有哪些，也能幫助我們在不熟悉Tableau的時候，也能輕鬆做出想做出的視覺圖表。</p>



<figure class="wp-block-image size-large"><a href="https://i0.wp.com/aderlab.com/wp-content/uploads/showme-line.png?ssl=1"><img data-recalc-dims="1" loading="lazy" decoding="async" width="708" height="398" src="https://i0.wp.com/aderlab.com/wp-content/uploads/showme-line.png?resize=708%2C398&#038;ssl=1" alt="" class="wp-image-5050" srcset="https://i0.wp.com/aderlab.com/wp-content/uploads/showme-line.png?resize=1024%2C576&amp;ssl=1 1024w, https://i0.wp.com/aderlab.com/wp-content/uploads/showme-line.png?resize=300%2C169&amp;ssl=1 300w, https://i0.wp.com/aderlab.com/wp-content/uploads/showme-line.png?resize=768%2C432&amp;ssl=1 768w, https://i0.wp.com/aderlab.com/wp-content/uploads/showme-line.png?resize=1536%2C864&amp;ssl=1 1536w, https://i0.wp.com/aderlab.com/wp-content/uploads/showme-line.png?w=1801&amp;ssl=1 1801w, https://i0.wp.com/aderlab.com/wp-content/uploads/showme-line.png?w=1416&amp;ssl=1 1416w" sizes="auto, (max-width: 708px) 100vw, 708px" /></a></figure>



<p>在 Tableau 做出折線圖其實也非常容易，從「顯示」的圖表建議來看，折線圖的必要欄位只需要兩個欄位，一個是日期欄位，另外一個則是度量（指標）就可以了。日期欄位前面會是像日曆的小圖案，這就代表資料有正確被解讀成日期資料，但有些時候，如果你匯入的資料不符合 Tableau 的日期格式的話， Tableau 可能就不會自動判斷這個欄位是日期資料，這種情況就建議需要處理原始資料，或是用 Calculation 的計算建立出日期欄位。</p>



<p>那麼什麼樣的情況會造成 Tableau 無法自動判讀欄位資料是不是日期資料呢？</p>



<ol class="wp-block-list">
<li>日期資料年份以民國年紀錄，例如：112/06/01。</li>



<li>日期資料包括時間資料，例如：2023/06/01 00:00:00。</li>



<li>日期資料間沒有間隔符號，例如：20230601。</li>
</ol>



<p>如果資料被正確判斷成日期格式，你就可以看到將日期拉到欄或列之後，預設資料會以離散值的「年份」呈現，年(Order Date) 的維度前方有個 + 的符號，代表可以再將資料往下展開到季、月、日的資料維度，當然，你也可以選擇透過在「年(Order Date) 」的維度點選右鍵，直接將日期資料更改成以「年月」、「月」、「日」等資料格式呈現，這樣就做出了第一張折線圖圖表了。</p>



<figure class="wp-block-image size-large"><a href="https://i0.wp.com/aderlab.com/wp-content/uploads/dimension-1-1024x576.png?ssl=1"><img data-recalc-dims="1" loading="lazy" decoding="async" width="708" height="398" src="https://i0.wp.com/aderlab.com/wp-content/uploads/dimension-1.png?resize=708%2C398&#038;ssl=1" alt="" class="wp-image-5051" srcset="https://i0.wp.com/aderlab.com/wp-content/uploads/dimension-1.png?resize=1024%2C576&amp;ssl=1 1024w, https://i0.wp.com/aderlab.com/wp-content/uploads/dimension-1.png?resize=300%2C169&amp;ssl=1 300w, https://i0.wp.com/aderlab.com/wp-content/uploads/dimension-1.png?resize=768%2C432&amp;ssl=1 768w, https://i0.wp.com/aderlab.com/wp-content/uploads/dimension-1.png?resize=1536%2C864&amp;ssl=1 1536w, https://i0.wp.com/aderlab.com/wp-content/uploads/dimension-1.png?w=1801&amp;ssl=1 1801w, https://i0.wp.com/aderlab.com/wp-content/uploads/dimension-1.png?w=1416&amp;ssl=1 1416w" sizes="auto, (max-width: 708px) 100vw, 708px" /></a></figure>



<h2 class="wp-block-heading">折線圖的基本設計功能</h2>



<p>不過做完第一張折線圖還不太夠，很多時候我們需要在折線圖上做些調整標註，讓我們可以更加凸顯想要呈現的資料重點，不論是為了視覺上的好看，或是為了呈現資料與想傳達的重點，我們都需要知道可以如何在折線圖上做些基本的視覺調整，以下就來分享 6 個常用的設計功能：</p>



<h3 class="wp-block-heading">Y軸資料起始點、資料間隔</h3>



<p>在Y軸的欄位點選右鍵，選擇「編輯軸&#8230;」，就可以設定：Y軸軸名稱、Y軸資料起始點與結束點，也可以調整選擇Y軸起始點是否要包含0。至於資料間隔如果要調整可不可以呢？當然可以，只要點選「刻度線」就可以在刻度線的地方設定主要刻度線的間距了。</p>



<figure class="wp-block-image size-large"><a href="https://i0.wp.com/aderlab.com/wp-content/uploads/%E6%8A%95%E5%BD%B1%E7%89%8716-1.png?ssl=1"><img data-recalc-dims="1" loading="lazy" decoding="async" width="708" height="398" src="https://i0.wp.com/aderlab.com/wp-content/uploads/%E6%8A%95%E5%BD%B1%E7%89%8716-1.png?resize=708%2C398&#038;ssl=1" alt="" class="wp-image-5057" srcset="https://i0.wp.com/aderlab.com/wp-content/uploads/%E6%8A%95%E5%BD%B1%E7%89%8716-1.png?resize=1024%2C576&amp;ssl=1 1024w, https://i0.wp.com/aderlab.com/wp-content/uploads/%E6%8A%95%E5%BD%B1%E7%89%8716-1.png?resize=300%2C169&amp;ssl=1 300w, https://i0.wp.com/aderlab.com/wp-content/uploads/%E6%8A%95%E5%BD%B1%E7%89%8716-1.png?resize=768%2C432&amp;ssl=1 768w, https://i0.wp.com/aderlab.com/wp-content/uploads/%E6%8A%95%E5%BD%B1%E7%89%8716-1.png?resize=1536%2C864&amp;ssl=1 1536w, https://i0.wp.com/aderlab.com/wp-content/uploads/%E6%8A%95%E5%BD%B1%E7%89%8716-1.png?w=1801&amp;ssl=1 1801w, https://i0.wp.com/aderlab.com/wp-content/uploads/%E6%8A%95%E5%BD%B1%E7%89%8716-1.png?w=1416&amp;ssl=1 1416w" sizes="auto, (max-width: 708px) 100vw, 708px" /></a></figure>



<h3 class="wp-block-heading">X軸的日期格式</h3>



<p>X軸的日期格式設定則比較複雜，依照不同的情況，我們可以會想要呈現不同的日期格式，例如說只呈現月份、要同時呈現年月日期、要呈現英文的日期格式等，這時候我們就需要注意現在的日期欄位是連續值還是離散值。</p>



<p>一種最簡單的判斷方式，就是看日期資料放到欄或列的時候，圖示是藍色還是綠色，如果是藍色，就代表現在的設定是離散值，相反的，如果呈現綠色，那就代表是連續值。</p>



<figure class="wp-block-image size-large"><a href="https://i0.wp.com/aderlab.com/wp-content/uploads/contiune.png?ssl=1"><img data-recalc-dims="1" loading="lazy" decoding="async" width="708" height="398" src="https://i0.wp.com/aderlab.com/wp-content/uploads/contiune.png?resize=708%2C398&#038;ssl=1" alt="" class="wp-image-5058" srcset="https://i0.wp.com/aderlab.com/wp-content/uploads/contiune.png?resize=1024%2C576&amp;ssl=1 1024w, https://i0.wp.com/aderlab.com/wp-content/uploads/contiune.png?resize=300%2C169&amp;ssl=1 300w, https://i0.wp.com/aderlab.com/wp-content/uploads/contiune.png?resize=768%2C432&amp;ssl=1 768w, https://i0.wp.com/aderlab.com/wp-content/uploads/contiune.png?resize=1536%2C864&amp;ssl=1 1536w, https://i0.wp.com/aderlab.com/wp-content/uploads/contiune.png?w=1801&amp;ssl=1 1801w, https://i0.wp.com/aderlab.com/wp-content/uploads/contiune.png?w=1416&amp;ssl=1 1416w" sizes="auto, (max-width: 708px) 100vw, 708px" /></a></figure>



<figure class="wp-block-image size-large"><a href="https://i0.wp.com/aderlab.com/wp-content/uploads/discrete.png?ssl=1"><img data-recalc-dims="1" loading="lazy" decoding="async" width="708" height="398" src="https://i0.wp.com/aderlab.com/wp-content/uploads/discrete.png?resize=708%2C398&#038;ssl=1" alt="" class="wp-image-5059" srcset="https://i0.wp.com/aderlab.com/wp-content/uploads/discrete.png?resize=1024%2C576&amp;ssl=1 1024w, https://i0.wp.com/aderlab.com/wp-content/uploads/discrete.png?resize=300%2C169&amp;ssl=1 300w, https://i0.wp.com/aderlab.com/wp-content/uploads/discrete.png?resize=768%2C432&amp;ssl=1 768w, https://i0.wp.com/aderlab.com/wp-content/uploads/discrete.png?resize=1536%2C864&amp;ssl=1 1536w, https://i0.wp.com/aderlab.com/wp-content/uploads/discrete.png?w=1801&amp;ssl=1 1801w, https://i0.wp.com/aderlab.com/wp-content/uploads/discrete.png?w=1416&amp;ssl=1 1416w" sizes="auto, (max-width: 708px) 100vw, 708px" /></a></figure>



<p>什麼情況要將日期設定成離散值？什麼情況又要將日期設定成連續值呢？我們可以先來看看離散值跟連續值的圖表差異。</p>



<p>差異1：日期顯示的詳細度</p>



<p>相對來說，當日期設定成連續值的時候，X軸呈現的日期會較少，而如果設定離散值的話，因為會認定每個日期皆為離散且不同，就會較詳細的呈現日期。</p>



<figure class="wp-block-image size-large"><a href="https://i0.wp.com/aderlab.com/wp-content/uploads/contiunediscrete.png?ssl=1"><img data-recalc-dims="1" loading="lazy" decoding="async" width="708" height="398" src="https://i0.wp.com/aderlab.com/wp-content/uploads/contiunediscrete.png?resize=708%2C398&#038;ssl=1" alt="" class="wp-image-5060" srcset="https://i0.wp.com/aderlab.com/wp-content/uploads/contiunediscrete.png?resize=1024%2C576&amp;ssl=1 1024w, https://i0.wp.com/aderlab.com/wp-content/uploads/contiunediscrete.png?resize=300%2C169&amp;ssl=1 300w, https://i0.wp.com/aderlab.com/wp-content/uploads/contiunediscrete.png?resize=768%2C432&amp;ssl=1 768w, https://i0.wp.com/aderlab.com/wp-content/uploads/contiunediscrete.png?resize=1536%2C864&amp;ssl=1 1536w, https://i0.wp.com/aderlab.com/wp-content/uploads/contiunediscrete.png?w=1801&amp;ssl=1 1801w, https://i0.wp.com/aderlab.com/wp-content/uploads/contiunediscrete.png?w=1416&amp;ssl=1 1416w" sizes="auto, (max-width: 708px) 100vw, 708px" /></a></figure>



<p>差異2：日期顯示格式能否自訂</p>



<p>將日期設定成連續值還有一個好處，那就是可以自訂日期要顯示的資料格式，例如說要寫成英式的日期寫法，就可以寫dd/mm/yyyy，用自訂格式的方式來呈現X軸的日期。但如果我們使用的是離散的日期，那就只能依照預設的日期格式擇一選擇了。</p>



<figure class="wp-block-image size-large"><a href="https://i0.wp.com/aderlab.com/wp-content/uploads/contiunediscrete-2-1024x576.png?ssl=1"><img data-recalc-dims="1" loading="lazy" decoding="async" width="708" height="398" src="https://i0.wp.com/aderlab.com/wp-content/uploads/contiunediscrete-2.png?resize=708%2C398&#038;ssl=1" alt="" class="wp-image-5061" srcset="https://i0.wp.com/aderlab.com/wp-content/uploads/contiunediscrete-2.png?resize=1024%2C576&amp;ssl=1 1024w, https://i0.wp.com/aderlab.com/wp-content/uploads/contiunediscrete-2.png?resize=300%2C169&amp;ssl=1 300w, https://i0.wp.com/aderlab.com/wp-content/uploads/contiunediscrete-2.png?resize=768%2C432&amp;ssl=1 768w, https://i0.wp.com/aderlab.com/wp-content/uploads/contiunediscrete-2.png?resize=1536%2C864&amp;ssl=1 1536w, https://i0.wp.com/aderlab.com/wp-content/uploads/contiunediscrete-2.png?w=1801&amp;ssl=1 1801w, https://i0.wp.com/aderlab.com/wp-content/uploads/contiunediscrete-2.png?w=1416&amp;ssl=1 1416w" sizes="auto, (max-width: 708px) 100vw, 708px" /></a></figure>



<p>差異3：視覺效果是否會有斷層區隔的視覺效果</p>



<p>第三個差異則是離散值跟連續值在日期資料展開後，圖表上會呈現完全不同的視覺效果，連續日期會將所有的資料連結起來，形成一條連續的曲線圖，而離散值資料，因為不同年份被視為不同的離散且不同的日期，所以不同年份之間就會有曲線斷點，就像是將資料隔開來一樣的感覺。</p>



<figure class="wp-block-image size-large"><a href="https://i0.wp.com/aderlab.com/wp-content/uploads/contiunediscrete-3-1.png?ssl=1"><img data-recalc-dims="1" loading="lazy" decoding="async" width="708" height="398" src="https://i0.wp.com/aderlab.com/wp-content/uploads/contiunediscrete-3-1.png?resize=708%2C398&#038;ssl=1" alt="" class="wp-image-5064" srcset="https://i0.wp.com/aderlab.com/wp-content/uploads/contiunediscrete-3-1.png?resize=1024%2C576&amp;ssl=1 1024w, https://i0.wp.com/aderlab.com/wp-content/uploads/contiunediscrete-3-1.png?resize=300%2C169&amp;ssl=1 300w, https://i0.wp.com/aderlab.com/wp-content/uploads/contiunediscrete-3-1.png?resize=768%2C432&amp;ssl=1 768w, https://i0.wp.com/aderlab.com/wp-content/uploads/contiunediscrete-3-1.png?resize=1536%2C864&amp;ssl=1 1536w, https://i0.wp.com/aderlab.com/wp-content/uploads/contiunediscrete-3-1.png?w=1801&amp;ssl=1 1801w, https://i0.wp.com/aderlab.com/wp-content/uploads/contiunediscrete-3-1.png?w=1416&amp;ssl=1 1416w" sizes="auto, (max-width: 708px) 100vw, 708px" /></a></figure>



<p>了解完這三大差異，大家就可以依照自己設計圖表的需求，自己挑選使用離散值日期或是連續值日期了。至於設定方式則是在日期的膠囊點選右鍵，就可以看到設定日期格式的選項了。</p>



<figure class="wp-block-image size-large"><a href="https://i0.wp.com/aderlab.com/wp-content/uploads/contiune-setup-1.png?ssl=1"><img data-recalc-dims="1" loading="lazy" decoding="async" width="708" height="398" src="https://i0.wp.com/aderlab.com/wp-content/uploads/contiune-setup-1.png?resize=708%2C398&#038;ssl=1" alt="" class="wp-image-5065" srcset="https://i0.wp.com/aderlab.com/wp-content/uploads/contiune-setup-1.png?resize=1024%2C576&amp;ssl=1 1024w, https://i0.wp.com/aderlab.com/wp-content/uploads/contiune-setup-1.png?resize=300%2C169&amp;ssl=1 300w, https://i0.wp.com/aderlab.com/wp-content/uploads/contiune-setup-1.png?resize=768%2C432&amp;ssl=1 768w, https://i0.wp.com/aderlab.com/wp-content/uploads/contiune-setup-1.png?resize=1536%2C864&amp;ssl=1 1536w, https://i0.wp.com/aderlab.com/wp-content/uploads/contiune-setup-1.png?w=1801&amp;ssl=1 1801w, https://i0.wp.com/aderlab.com/wp-content/uploads/contiune-setup-1.png?w=1416&amp;ssl=1 1416w" sizes="auto, (max-width: 708px) 100vw, 708px" /></a></figure>



<h3 class="wp-block-heading">建立資料點</h3>



<p>接下來來分享如何向下圖一樣，讓每個日期的資料點顯示出來，這在折線圖的涵蓋日期範圍很廣，或是每個月資料差異不大的時候特別適合使用，因爲有了資料點我們才知道哪些才是真正的資料點，而哪些則指示資料與資料連接的折線。</p>



<figure class="wp-block-image size-large is-resized"><a href="https://i0.wp.com/aderlab.com/wp-content/uploads/%E6%8A%95%E5%BD%B1%E7%89%876.png?ssl=1"><img data-recalc-dims="1" loading="lazy" decoding="async" src="https://i0.wp.com/aderlab.com/wp-content/uploads/%E6%8A%95%E5%BD%B1%E7%89%876.png?resize=708%2C398&#038;ssl=1" alt="" class="wp-image-5052" width="708" height="398" srcset="https://i0.wp.com/aderlab.com/wp-content/uploads/%E6%8A%95%E5%BD%B1%E7%89%876.png?resize=1024%2C576&amp;ssl=1 1024w, https://i0.wp.com/aderlab.com/wp-content/uploads/%E6%8A%95%E5%BD%B1%E7%89%876.png?resize=300%2C169&amp;ssl=1 300w, https://i0.wp.com/aderlab.com/wp-content/uploads/%E6%8A%95%E5%BD%B1%E7%89%876.png?resize=768%2C432&amp;ssl=1 768w, https://i0.wp.com/aderlab.com/wp-content/uploads/%E6%8A%95%E5%BD%B1%E7%89%876.png?resize=1536%2C864&amp;ssl=1 1536w, https://i0.wp.com/aderlab.com/wp-content/uploads/%E6%8A%95%E5%BD%B1%E7%89%876.png?w=1801&amp;ssl=1 1801w, https://i0.wp.com/aderlab.com/wp-content/uploads/%E6%8A%95%E5%BD%B1%E7%89%876.png?w=1416&amp;ssl=1 1416w" sizes="auto, (max-width: 708px) 100vw, 708px" /></a></figure>



<p>設定資料點的地方我個人認為沒有非常直覺，設定的地方在「色彩」設定的下方選項，由左到右分別是「自動」、「全部」以及「無」，預設會是自動，如果希望折線圖每個日期節點都有標註的圓點，就可以把設定更改為「全部」。</p>



<figure class="wp-block-image size-large"><a href="https://i0.wp.com/aderlab.com/wp-content/uploads/line-point.png?ssl=1"><img data-recalc-dims="1" loading="lazy" decoding="async" width="708" height="398" src="https://i0.wp.com/aderlab.com/wp-content/uploads/line-point.png?resize=708%2C398&#038;ssl=1" alt="" class="wp-image-5066" srcset="https://i0.wp.com/aderlab.com/wp-content/uploads/line-point.png?resize=1024%2C576&amp;ssl=1 1024w, https://i0.wp.com/aderlab.com/wp-content/uploads/line-point.png?resize=300%2C169&amp;ssl=1 300w, https://i0.wp.com/aderlab.com/wp-content/uploads/line-point.png?resize=768%2C432&amp;ssl=1 768w, https://i0.wp.com/aderlab.com/wp-content/uploads/line-point.png?resize=1536%2C864&amp;ssl=1 1536w, https://i0.wp.com/aderlab.com/wp-content/uploads/line-point.png?w=1801&amp;ssl=1 1801w, https://i0.wp.com/aderlab.com/wp-content/uploads/line-point.png?w=1416&amp;ssl=1 1416w" sizes="auto, (max-width: 708px) 100vw, 708px" /></a></figure>



<h3 class="wp-block-heading">顯示資料標籤</h3>



<p>接下來，有些時候我們需要做資料標註，讓閱聽者知道折線圖上的某些時間點，資料到底是多少。有幾種標註方式，一種是全數標註，適合用在資料範圍小的折線圖上，且標示的資料數字也不大的情況下，但是全數標註最大的問題就是容易讓人眼花撩亂，所以我常常會做的是「最大最小值」的資料標註，或是在特殊月份，有發生特別值得提的事情的時候才在個別的折線圖上做標註。</p>



<figure class="wp-block-image size-large is-resized"><a href="https://i0.wp.com/aderlab.com/wp-content/uploads/%E6%8A%95%E5%BD%B1%E7%89%877.png?ssl=1"><img data-recalc-dims="1" loading="lazy" decoding="async" src="https://i0.wp.com/aderlab.com/wp-content/uploads/%E6%8A%95%E5%BD%B1%E7%89%877.png?resize=708%2C398&#038;ssl=1" alt="" class="wp-image-5053" width="708" height="398" srcset="https://i0.wp.com/aderlab.com/wp-content/uploads/%E6%8A%95%E5%BD%B1%E7%89%877.png?resize=1024%2C576&amp;ssl=1 1024w, https://i0.wp.com/aderlab.com/wp-content/uploads/%E6%8A%95%E5%BD%B1%E7%89%877.png?resize=300%2C169&amp;ssl=1 300w, https://i0.wp.com/aderlab.com/wp-content/uploads/%E6%8A%95%E5%BD%B1%E7%89%877.png?resize=768%2C432&amp;ssl=1 768w, https://i0.wp.com/aderlab.com/wp-content/uploads/%E6%8A%95%E5%BD%B1%E7%89%877.png?resize=1536%2C864&amp;ssl=1 1536w, https://i0.wp.com/aderlab.com/wp-content/uploads/%E6%8A%95%E5%BD%B1%E7%89%877.png?w=1801&amp;ssl=1 1801w, https://i0.wp.com/aderlab.com/wp-content/uploads/%E6%8A%95%E5%BD%B1%E7%89%877.png?w=1416&amp;ssl=1 1416w" sizes="auto, (max-width: 708px) 100vw, 708px" /></a></figure>



<p>資料標註我們可以在左側的標籤做設定，勾選「標記標籤」，接著在下方選擇顯示的範圍，例如「全部」就代表每個資料點都顯示資料，以這份範例就會顯示每個月的Sales營業額總額，而像我範例選擇「最小/最大」，那麼折線圖上就會只顯示在資料範圍內最大的營業額月份的營收，以下最小營業額的月份營業額總額。</p>



<p>最後也要提醒一下，有時候當我們的資料範圍較大，全部的資料顯示如果太擁擠會彼此覆蓋的時候，系統會自動幫我們屏蔽部分的資料顯示，如果不希望被屏蔽部分資料的話，也可以勾選最下方「允許標籤覆蓋其他標記」，就可以完整顯示所有的資料了。</p>



<figure class="wp-block-image size-large"><a href="https://i0.wp.com/aderlab.com/wp-content/uploads/line-point-label-1024x576.png?ssl=1"><img data-recalc-dims="1" loading="lazy" decoding="async" width="708" height="398" src="https://i0.wp.com/aderlab.com/wp-content/uploads/line-point-label.png?resize=708%2C398&#038;ssl=1" alt="" class="wp-image-5067" srcset="https://i0.wp.com/aderlab.com/wp-content/uploads/line-point-label.png?resize=1024%2C576&amp;ssl=1 1024w, https://i0.wp.com/aderlab.com/wp-content/uploads/line-point-label.png?resize=300%2C169&amp;ssl=1 300w, https://i0.wp.com/aderlab.com/wp-content/uploads/line-point-label.png?resize=768%2C432&amp;ssl=1 768w, https://i0.wp.com/aderlab.com/wp-content/uploads/line-point-label.png?resize=1536%2C864&amp;ssl=1 1536w, https://i0.wp.com/aderlab.com/wp-content/uploads/line-point-label.png?w=1801&amp;ssl=1 1801w, https://i0.wp.com/aderlab.com/wp-content/uploads/line-point-label.png?w=1416&amp;ssl=1 1416w" sizes="auto, (max-width: 708px) 100vw, 708px" /></a></figure>



<h3 class="wp-block-heading">建立資料參考線</h3>



<p>接下來，我們要怎麼知道每個月月份的營收狀況好不好呢？常用的方式就是比較，可能可以跟設定的目標比較，當然也可以跟年度平均比較，不過如果要跟年度平均比較的話，就特別需要注意產業有沒有月份淡旺季的因素，才不會有比較失準的狀況。</p>



<figure class="wp-block-image size-large"><a href="https://i0.wp.com/aderlab.com/wp-content/uploads/%E6%8A%95%E5%BD%B1%E7%89%8710-1.png?ssl=1"><img data-recalc-dims="1" loading="lazy" decoding="async" width="708" height="398" src="https://i0.wp.com/aderlab.com/wp-content/uploads/%E6%8A%95%E5%BD%B1%E7%89%8710-1.png?resize=708%2C398&#038;ssl=1" alt="" class="wp-image-5055" srcset="https://i0.wp.com/aderlab.com/wp-content/uploads/%E6%8A%95%E5%BD%B1%E7%89%8710-1.png?resize=1024%2C576&amp;ssl=1 1024w, https://i0.wp.com/aderlab.com/wp-content/uploads/%E6%8A%95%E5%BD%B1%E7%89%8710-1.png?resize=300%2C169&amp;ssl=1 300w, https://i0.wp.com/aderlab.com/wp-content/uploads/%E6%8A%95%E5%BD%B1%E7%89%8710-1.png?resize=768%2C432&amp;ssl=1 768w, https://i0.wp.com/aderlab.com/wp-content/uploads/%E6%8A%95%E5%BD%B1%E7%89%8710-1.png?resize=1536%2C864&amp;ssl=1 1536w, https://i0.wp.com/aderlab.com/wp-content/uploads/%E6%8A%95%E5%BD%B1%E7%89%8710-1.png?w=1801&amp;ssl=1 1801w, https://i0.wp.com/aderlab.com/wp-content/uploads/%E6%8A%95%E5%BD%B1%E7%89%8710-1.png?w=1416&amp;ssl=1 1416w" sizes="auto, (max-width: 708px) 100vw, 708px" /></a></figure>



<p>設定趨勢平均線的設定方法有兩種，一種是直接在Y軸範圍點選右鍵，選擇「新增參考線」，可以選擇平均值、中位數、最大值、最小值或是自訂數值，並且選擇是要呈現「參考線」、「參考範圍區間」等，不論是哪種設定，都能幫助我們用來當作每月營收好壞的參考基準。</p>



<figure class="wp-block-image size-large"><a href="https://i0.wp.com/aderlab.com/wp-content/uploads/reference-1.png?ssl=1"><img data-recalc-dims="1" loading="lazy" decoding="async" width="708" height="398" src="https://i0.wp.com/aderlab.com/wp-content/uploads/reference-1.png?resize=708%2C398&#038;ssl=1" alt="" class="wp-image-5069" srcset="https://i0.wp.com/aderlab.com/wp-content/uploads/reference-1.png?resize=1024%2C576&amp;ssl=1 1024w, https://i0.wp.com/aderlab.com/wp-content/uploads/reference-1.png?resize=300%2C169&amp;ssl=1 300w, https://i0.wp.com/aderlab.com/wp-content/uploads/reference-1.png?resize=768%2C432&amp;ssl=1 768w, https://i0.wp.com/aderlab.com/wp-content/uploads/reference-1.png?resize=1536%2C864&amp;ssl=1 1536w, https://i0.wp.com/aderlab.com/wp-content/uploads/reference-1.png?w=1801&amp;ssl=1 1801w, https://i0.wp.com/aderlab.com/wp-content/uploads/reference-1.png?w=1416&amp;ssl=1 1416w" sizes="auto, (max-width: 708px) 100vw, 708px" /></a></figure>



<p>第二種設定方式是到左側的「分析」裡面選擇「輔助線」，一樣也可以設定上述的參考線。</p>



<figure class="wp-block-image size-large"><a href="https://i0.wp.com/aderlab.com/wp-content/uploads/reference-1-1.png?ssl=1"><img data-recalc-dims="1" loading="lazy" decoding="async" width="708" height="398" src="https://i0.wp.com/aderlab.com/wp-content/uploads/reference-1-1.png?resize=708%2C398&#038;ssl=1" alt="" class="wp-image-5070" srcset="https://i0.wp.com/aderlab.com/wp-content/uploads/reference-1-1.png?resize=1024%2C576&amp;ssl=1 1024w, https://i0.wp.com/aderlab.com/wp-content/uploads/reference-1-1.png?resize=300%2C169&amp;ssl=1 300w, https://i0.wp.com/aderlab.com/wp-content/uploads/reference-1-1.png?resize=768%2C432&amp;ssl=1 768w, https://i0.wp.com/aderlab.com/wp-content/uploads/reference-1-1.png?resize=1536%2C864&amp;ssl=1 1536w, https://i0.wp.com/aderlab.com/wp-content/uploads/reference-1-1.png?w=1801&amp;ssl=1 1801w, https://i0.wp.com/aderlab.com/wp-content/uploads/reference-1-1.png?w=1416&amp;ssl=1 1416w" sizes="auto, (max-width: 708px) 100vw, 708px" /></a></figure>



<h3 class="wp-block-heading">以顏色展開資料維度</h3>



<p>最後一種折線圖的設定方式，我個人覺得非常實用，而且強力推薦可以使用這種方式來查看不同的資料維度，那就是把折線圖依照維度做資料切分，以下圖的例子來說，我將「年份」放入色彩，所以資料就呈現出4個不同年份，每個年份的每月營收趨勢，就可以大抵推測，2月、10月都是這家商店的淡季，而3月、9月、11月則是相對的銷售旺季。</p>



<figure class="wp-block-image size-large"><a href="https://i0.wp.com/aderlab.com/wp-content/uploads/%E6%8A%95%E5%BD%B1%E7%89%878.png?ssl=1"><img data-recalc-dims="1" loading="lazy" decoding="async" width="708" height="398" src="https://i0.wp.com/aderlab.com/wp-content/uploads/%E6%8A%95%E5%BD%B1%E7%89%878.png?resize=708%2C398&#038;ssl=1" alt="" class="wp-image-5054" srcset="https://i0.wp.com/aderlab.com/wp-content/uploads/%E6%8A%95%E5%BD%B1%E7%89%878.png?resize=1024%2C576&amp;ssl=1 1024w, https://i0.wp.com/aderlab.com/wp-content/uploads/%E6%8A%95%E5%BD%B1%E7%89%878.png?resize=300%2C169&amp;ssl=1 300w, https://i0.wp.com/aderlab.com/wp-content/uploads/%E6%8A%95%E5%BD%B1%E7%89%878.png?resize=768%2C432&amp;ssl=1 768w, https://i0.wp.com/aderlab.com/wp-content/uploads/%E6%8A%95%E5%BD%B1%E7%89%878.png?resize=1536%2C864&amp;ssl=1 1536w, https://i0.wp.com/aderlab.com/wp-content/uploads/%E6%8A%95%E5%BD%B1%E7%89%878.png?w=1801&amp;ssl=1 1801w, https://i0.wp.com/aderlab.com/wp-content/uploads/%E6%8A%95%E5%BD%B1%E7%89%878.png?w=1416&amp;ssl=1 1416w" sizes="auto, (max-width: 708px) 100vw, 708px" /></a></figure>



<p>那具體要怎麼做出上述的視覺效果呢？也很容易，只要把想要分析的維度拉到色彩，折線圖就會依照那個維度，將維度有的資料做切分，以下圖來說，我們就可以輕鬆看出每個產品品類每月的銷售量，以及不同產品分類的銷售額趨勢了。</p>



<figure class="wp-block-image size-large"><a href="https://i0.wp.com/aderlab.com/wp-content/uploads/color-spilt.png?ssl=1"><img data-recalc-dims="1" loading="lazy" decoding="async" width="708" height="398" src="https://i0.wp.com/aderlab.com/wp-content/uploads/color-spilt.png?resize=708%2C398&#038;ssl=1" alt="" class="wp-image-5072" srcset="https://i0.wp.com/aderlab.com/wp-content/uploads/color-spilt.png?resize=1024%2C576&amp;ssl=1 1024w, https://i0.wp.com/aderlab.com/wp-content/uploads/color-spilt.png?resize=300%2C169&amp;ssl=1 300w, https://i0.wp.com/aderlab.com/wp-content/uploads/color-spilt.png?resize=768%2C432&amp;ssl=1 768w, https://i0.wp.com/aderlab.com/wp-content/uploads/color-spilt.png?resize=1536%2C864&amp;ssl=1 1536w, https://i0.wp.com/aderlab.com/wp-content/uploads/color-spilt.png?w=1801&amp;ssl=1 1801w, https://i0.wp.com/aderlab.com/wp-content/uploads/color-spilt.png?w=1416&amp;ssl=1 1416w" sizes="auto, (max-width: 708px) 100vw, 708px" /></a></figure>



<p>那這篇關於折線圖的介紹跟基本設定就分享到這裡，下次再來談談折線圖的進階運用與搭配圖表，下篇文章見啦：）</p>



<p class="has-text-align-right">Sharon</p>



<hr class="wp-block-separator has-alpha-channel-opacity is-style-wide"/>



<p class="has-medium-font-size"><strong>Buy me a coffee&nbsp; 用行動支持我的內容創作</strong></p>



<p><em>如果我的文章對你有幫助，歡迎用行動支持我的內容創作，小額贊助請我喝咖啡、留言或是寄信來跟我分享你的收穫，都會讓我持續有動力分享更多內容唷～</em></p>



<div class="wp-block-buttons is-layout-flex wp-block-buttons-is-layout-flex">
<div class="wp-block-button aligncenter is-style-fill"><a class="wp-block-button__link has-black-color has-luminous-vivid-amber-background-color has-text-color has-background wp-element-button" href="https://www.buymeacoffee.com/aderlabsharon" target="_blank" rel="noreferrer noopener">以小額贊助支持Sharon</a></div>
</div>
<p>這篇文章 <a href="https://aderlab.com/data-analytics/tableau-line-1/">【Tableau 教學】折線圖設計技巧1：做出折線圖與基礎設定教學</a> 最早出現於 <a href="https://aderlab.com">Sharon Lab∣雪倫實驗室</a>。</p>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">5049</post-id>	</item>
	</channel>
</rss>
