สร้างสีสันให้ Dashboard ด้วย Dynamic Icons ใน Power BI: เทคนิคง่าย ๆ ที่ทำให้ข้อมูลของคุณมีชีวิต

สร้างสีสันให้ Dashboard ด้วย Dynamic Icons ใน Power BI: เทคนิคง่าย ๆ ที่ทำให้ข้อมูลของคุณมีชีวิต

30 July 2024

คุณเคยรู้สึกว่าการนำเสนอข้อมูลของคุณยังขาดความน่าสนใจหรือไม่ ลองนึกภาพดูว่าถ้าคุณสามารถเพิ่มชีวิตชีวาให้กับตัวเลขและกราฟของคุณด้วยไอคอนที่เปลี่ยนแปลงอย่างมีชีวิตชีวาตามข้อมูลจริง จะเป็นอย่างไร วันนี้เราจะมาเรียนรู้วิธีสร้าง Dynamic Icons ใน Power BI – เทคนิคที่จะทำให้ Dashboard ของคุณโดดเด่น สื่อสารข้อมูลได้อย่างมีประสิทธิภาพ และสร้างความประทับใจให้กับผู้ชมของคุณ

บทความนี้จะอธิบายถึงการสร้างไอคอนที่มีการเปลี่ยนแปลงไปตามข้อมูลหรือ Dynamic icons ที่ใช้งานในโปรแกรม Power BI ตัวอย่างดังรูปที่ 1 เมื่อค่าผลรวมกำไรมีค่ามากกว่า 0 จะแสดงสัญลักษณ์ลูกศรชี้ขึ้นสีเขียว  แต่หากค่าผลรวมกำไรมีค่าน้อยกว่า 0 จะแสดงสัญลักษณ์ลูกศรชี้ลงสีแดง

รูปที่ 1 การแสดงผลของ Dynamic icons

          การนำเสนอดังกล่าวแสดงผลผ่าน Card (new) โดยทำการเพิ่มรูปภาพร่วมกับการแสดงผลของค่า ซึ่งการแสดงของไอคอนนั้นจะต้องสร้างสูตร (Measure) เพื่อระบุเงื่อนไขในการแสดงผล โครงสร้างสูตรเบื้องต้นมีส่วนประกอบดังรูปที่ 2 ภายใน “” จะต้องนำโค้ดของการแปลงไอคอนให้อยู่ในรูป image base64 เรียบร้อยแล้ว

รูปที่ 2 โครงสร้างสูตร (Measure) เพื่อแสดงผล Dynamic icons

          ก่อนอื่น เราสามารถค้นหาไอคอนที่ต้องการนำมาใช้งานได้จาก Flaticon ที่มีไอคอนฟรีมากมายให้เลือกใช้ โดยเลือกตัวเลือกการดาวน์โหลดเป็นไฟล์ PNG ขนาด 32px

รูปที่ 3 การดาวน์โหลดไอคอน

          จากนั้นนำภาพที่ได้ไปอัปโหลดและแปลงเป็นไฟล์ภาพ Base64 ที่ https://www.base64-image.de/

รูปที่ 4 การแปลงไฟล์ PNG เป็นไฟล์ Base64

          ให้ทำการกดปุ่ม copy image เพื่อนำโค้ดที่ได้ไปวางในสูตรที่เตรียมไว้ จะได้ผลลัพธ์ดังรูปที่ 5

รูปที่ 5 สูตรที่ระบุเงื่อนไขของ Dynamic icons

สุดท้ายให้เปลี่ยน Data category ของสูตรเป็น Image URL ดังรูปที่ 6

รูปที่ 6 การตั้งค่าแสดงผล Image

          สร้าง Card (new) โดยเลือกข้อมูลที่ต้องการแสดงผลมาใส่ ที่ Format visual ในเมนู Image เลือก Image type: Image URL ดังรูปที่ 7

รูปที่ 7 การตั้งค่าแสดงผล Image

จากนั้นคลิกที่ปุ่ม Conditional formatting จะปรากฏหน้าต่างดังรูปที่ 8 เลือกสูตรที่สร้างไว้มาใส่ กดปุ่ม OK

รูปที่ 8 ระบุสูตรสำหรับ Dynamic icons

          จะได้ผลลัพธ์เป็นค่าพร้อมด้วยไอคอนที่ปรับเปลี่ยนตามสูตรที่ต้องการแล้ว นอกจากนี้การแสดงผลสามารถเลือกเฉพาะ Dynamic icons โดยปิดการแสดงผล Values

รูปที่ 9 ตัวอย่างการใช้งาน Dynamic icons อื่น ๆ

          การแสดงผลสภาพอากาศมักถูกแสดงด้วยไอคอนที่เกี่ยวกับเมฆและฝน ดังแสดงในรูปที่ 8 จะเป็นการแสดงผลสภาพอากาศ 7 วันด้วยการใช้ Dynamic icons ในกรณีที่มีการวิเคราะห์สถานการณ์เสี่ยงน้ำแล้งและน้ำท่วมสามารถแสดงผลความรุนแรงของความเสี่ยงด้วยสี อาจจะใช้เพียงจุดสีธรรมดาในการแสดงผล

Dynamic Icons เป็นเครื่องมือที่มีประโยชน์สำหรับการสร้าง Visuals ที่น่าสนใจและเข้าใจง่ายใน Power BI ช่วยให้นักวิเคราะห์สื่อสารข้อมูลเชิงลึกแบบเรียลไทม์ เรายังมีเทคนิคอีกมากมายที่จะช่วยยกระดับการนำเสนอข้อมูลของคุณใน Power BI ให้น่าสนใจยิ่งขึ้น อย่าลืมติดตามบทความอื่น ๆ ของเราเพื่อเรียนรู้เทคนิคและเคล็ดลับใหม่ ๆ ที่จะช่วยให้คุณกลายเป็นผู้เชี่ยวชาญด้านการวิเคราะห์และนำเสนอข้อมูล เราพร้อมที่จะแบ่งปันความรู้และไอเดียสร้างสรรค์ใหม่ ๆ อยู่เสมอ มาร่วมเป็นส่วนหนึ่งในการพัฒนาทักษะการใช้ Power BI ไปด้วยกันนะคะ

บทความโดย ขวัญศิริ ศิริมังคลา
ตรวจทานและปรับปรุงโดย นววิทย์ พงศ์อนันต์

อ้างอิง

Senior Data Management Training and Development Specialist at Big Data Institute (Public Organization), BDI

แบ่งปันบทความ

กลุ่มเนื้อหา

แท็กยอดนิยม

แจ้งเรื่องที่อยากอ่าน

คุณสามารถแจ้งเรื่องที่อยากอ่านให้เราทราบได้ !
และเราจะนำไปพัฒนาบทความให้มีเนื้อหาที่น่าสนใจมากขึ้น

PDPA Icon

We use cookies to optimize your browsing experience and improve our website’s performance. Learn more at our Privacy Policy and adjust your cookie settings at Settings

Privacy Preferences

You can choose your cookie settings by turning on/off each type of cookie as needed, except for necessary cookies.

Accept all
Manage Consent Preferences
  • Strictly Necessary Cookies
    Always Active

    This type of cookie is essential for providing services on the website of the Personal Data Protection Committee Office, allowing you to access various parts of the site. It also helps remember information you have previously provided through the website. Disabling this type of cookie will result in your inability to use key services of the Personal Data Protection Committee Office that require cookies to function.
    Cookies Details

  • Performance Cookies

    This type of cookie helps the Big Data Institute (Public Organization) understand user interactions with its website services, including which pages or areas of the site are most popular, as well as analyze other related data. The Big Data Institute (Public Organization) also uses this information to improve website performance and gain a better understanding of user behavior. Although the data collected by these cookies is non-identifiable and used solely for statistical analysis, disabling them will prevent the Big Data Institute (Public Organization) from knowing the number of website visitors and from evaluating the quality of its services.

  • Functional Cookies

    This type of cookie enables the Big Data Institute (Public Organization)’s website to remember the choices you have made and deliver enhanced features and content tailored to your usage. For example, it can remember your username or changes you have made to font sizes or other customizable settings on the page. Disabling these cookies may result in the website not functioning properly.

  • Targeting Cookies

    "This type of cookie helps the Big Data Institute (Public Organization) understand user interactions with its website services, including which pages or areas of the site are most popular, as well as analyze other related data. The Big Data Institute (Public Organization) also uses this information to improve website performance and gain a better understanding of user behavior. Although the data collected by these cookies is non-identifiable and used solely for statistical analysis, disabling them will prevent the Big Data Institute (Public Organization) from knowing the number of website visitors and from evaluating the quality of its services.

Save settings
This site is registered on wpml.org as a development site. Switch to a production site key to remove this banner.