🇹🇭 วิธี Clear Cache ใน Power BI แก้ปัญหาดาต้าแปลกๆ แบบง่ายที่สุดที่มักลืมคิดถึง
สรุปจากคลิปของช่อง Lin Davoy คลิปนี้พูดถึงปัญหาที่คนใช้ Power BI เจอบ่อยแต่มักมองข้ามวิธีแก้ง่าย ๆ นั่นคือข้อมูลในรายงานดูแปลก ๆ ผิดจากที่ควรจะเป็น ทั้งที่กด Refresh ไปแล้วก็ยังไม่หาย ทางออกที่หลายคนลืมนึกถึงคือการ Clear Cache ซึ่งบางทีแก้ปัญหาได้เร็วกว่าการไล่หาสาเหตุทีละจุดเสียอีก
ทำไมข้อมูลใน Power BI ถึงดูแปลกทั้งที่ Refresh แล้ว
ในมุมคนทำงานจริง Power BI จะเก็บข้อมูลบางส่วนไว้เป็น Cache เพื่อให้เปิดไฟล์และโหลดกราฟได้เร็วขึ้นโดยไม่ต้องดึงข้อมูลใหม่ทั้งหมดทุกครั้ง แต่บางครั้ง Cache ตัวนี้เองที่กลายเป็นต้นเหตุของปัญหา เช่น แก้สูตรใน Power Query ไปแล้วแต่กราฟยังแสดงผลลัพธ์แบบเดิม เปลี่ยนแหล่งข้อมูลแล้วแต่ตัวเลขไม่ขยับตาม หรือลบคอลัมน์ไปแล้วแต่ยังเห็นชื่อคอลัมน์เดิมโผล่มาในบางจุด ปัญหาพวกนี้มักไม่ได้เกิดจากสูตรผิด แต่เกิดจาก Power BI ยังอ้างอิงข้อมูลเก่าที่ค้างอยู่ใน Cache นั่นเอง
Clear Cache คืออะไร แก้ปัญหาอะไรได้บ้าง
Clear Cache คือการสั่งให้ Power BI ล้างข้อมูลชั่วคราวที่เก็บไว้ทั้งหมดแล้วบังคับให้ดึงข้อมูลจากแหล่งต้นทางใหม่ทั้งหมดตั้งแต่ต้น ต่างจากการกด Refresh ปกติที่บางครั้งยังอิงข้อมูลบางส่วนจาก Cache อยู่ วิธีนี้ช่วยแก้ปัญหาที่ Refresh ธรรมดาแก้ไม่หาย เช่น กราฟค้างค่าเดิม ตัวกรอง (Filter) แสดงตัวเลือกเก่าที่ถูกลบไปแล้ว หรือไฟล์เริ่มมีอาการค้างและช้าผิดปกติโดยไม่มีสาเหตุชัดเจน
วิธี Clear Cache ใน Power BI Desktop
วิธีที่ง่ายที่สุดคือเข้าไปที่เมนู File เลือก Options and settings แล้วไปที่ Options จากนั้นเลือกหัวข้อ Data Load แล้วกดปุ่ม Clear Cache ในหน้านั้น ระบบจะล้าง Cache ทั้งหมดที่ Power BI เก็บไว้ทันที หลังจากนั้นให้ปิดและเปิดไฟล์ใหม่ แล้วกด Refresh อีกครั้งเพื่อให้ Power BI ดึงข้อมูลสดจากแหล่งต้นทางทั้งหมด ขั้นตอนนี้ใช้เวลาไม่นานแต่ช่วยแก้ปัญหาดาต้าประหลาดได้หลายกรณีที่ลองวิธีอื่นแล้วไม่หาย
| อาการที่เจอ | สาเหตุที่เป็นไปได้ |
|---|---|
| กราฟยังแสดงค่าเดิมหลัง Refresh | Cache ยังอ้างอิงข้อมูลเก่า |
| Filter โชว์ตัวเลือกที่ลบไปแล้ว | รายการค่าเก่าค้างอยู่ใน Cache |
| ไฟล์เปิดช้าหรือค้างผิดปกติ | Cache สะสมมากเกินไป |
| แก้สูตรใน Power Query แล้วผลลัพธ์ไม่เปลี่ยน | Power BI ยังใช้ผลลัพธ์เดิมที่เคยคำนวณไว้ |
ข้อควรระวังก่อน Clear Cache
การ Clear Cache จะทำให้การ Refresh ครั้งถัดไปใช้เวลานานกว่าปกติ เพราะ Power BI ต้องดึงข้อมูลใหม่ทั้งหมดแทนที่จะใช้ของเดิมบางส่วน โดยเฉพาะไฟล์ที่มีข้อมูลปริมาณมากหรือดึงจากหลายแหล่งพร้อมกัน จึงควรทำตอนที่ไม่รีบใช้งานไฟล์ และควรลองวิธีอื่นก่อน เช่น การ Refresh ปกติหรือปิดเปิดไฟล์ใหม่ ถ้ายังไม่หายค่อยมา Clear Cache เป็นทางเลือกสุดท้าย
สรุป
ถ้าเจอข้อมูลใน Power BI ที่ดูแปลกทั้งที่ Refresh แล้วหลายรอบ อย่าเพิ่งรีบไล่หาสาเหตุจากสูตรหรือแหล่งข้อมูลทั้งหมด ลองนึกถึง Clear Cache ไว้เป็นตัวเลือกต้น ๆ เพราะบางครั้งปัญหาที่ดูซับซ้อนกลับแก้ได้ง่าย ๆ แค่ล้าง Cache แล้วโหลดข้อมูลใหม่ทั้งหมดเท่านั้นเอง
🇬🇧 Clearing Cache in Power BI: The Simplest Fix People Forget
This article is summarized from the Lin Davoy channel. The video covers a problem Power BI users run into often but rarely think of the easy fix for: report data that looks wrong even after hitting refresh. The fix many people forget is clearing the cache, which sometimes solves the problem faster than chasing the cause step by step.
Why Power BI Data Can Look Wrong Even After a Refresh
From a practitioner point of view, Power BI stores part of its data as cache so files open and charts load faster without re-pulling everything every time. Sometimes that same cache becomes the source of the problem. A formula gets fixed in Power Query but the chart still shows the old result, a data source changes but the numbers do not move, or a deleted column still shows up somewhere in the report. These issues are usually not caused by a broken formula but by Power BI still referencing stale data sitting in cache.
What Clearing Cache Actually Does
Clearing cache tells Power BI to wipe all stored temporary data and pull everything from the source fresh. That is different from a normal refresh, which sometimes still relies on parts of the cached data. This fix handles cases a normal refresh cannot: charts stuck on old values, filters still showing options that were already deleted, or a file that has started running unusually slow with no obvious cause.
How to Clear Cache in Power BI Desktop
The simplest path is going to File, then Options and settings, then Options, and selecting Data Load. That page has a Clear Cache button that wipes everything Power BI has stored immediately. After that, close and reopen the file, then hit refresh again so Power BI pulls live data from every source. The whole process takes only a few minutes but resolves several kinds of odd data issues that other fixes could not.
| Symptom | Likely Cause |
|---|---|
| Chart still shows old values after refresh | Cache is still referencing stale data |
| Filter shows options already deleted | Old values still sitting in cache |
| File opens or runs unusually slow | Cache has built up too much |
| Power Query formula fixed but result unchanged | Power BI is reusing a previously calculated result |
Things to Watch Out for Before Clearing Cache
Clearing cache makes the next refresh slower than usual, since Power BI has to pull everything fresh instead of reusing part of what it already has, especially for large files or ones pulling from several sources at once. It is best done when there is no urgent need to use the file right away, and it is worth trying a normal refresh or simply reopening the file first. Clearing cache should be the option reached for once those simpler fixes fail.
Verdict
If Power BI data still looks wrong after several refreshes, do not jump straight to hunting through every formula and data source. Keep clearing cache near the top of the checklist, because what looks like a complicated problem often turns out to be solved by simply wiping the cache and pulling everything in fresh.
ติดตามข่าวสาร Data & AI ได้ที่:
Facebook: https://www.facebook.com/davoytech
YouTube: https://www.youtube.com/@linlinmhee
📌 อย่าลืมกด Like, Share และ Subscribe เป็นกำลังใจให้ด้วยนะคะ!
💬 เคยเจอปัญหาข้อมูลแปลก ๆ ใน Power BI แบบนี้บ้างไหมคะ สุดท้ายแก้ยังไง มาแชร์กันในคอมเมนต์ได้เลยค่ะ
#Davoy #DavoyTech #Linlinmhee #เรียนAI #คอร์สAI #DataAndAI #PowerBI #clearcache #PowerBITips #DataAnalytics #ExcelTips
