<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/">
    <channel>
        <title>老汪洞察 | 汪斌带你开公司</title>
        <link>https://docs.xiaoweihome.cn/</link>
        <description>让财税成为经营的力量</description>
        <lastBuildDate>Sun, 15 Feb 2026 12:38:00 GMT</lastBuildDate>
        <docs>https://validator.w3.org/feed/docs/rss2.html</docs>
        <generator>https://github.com/jpmonette/feed</generator>
        <language>zh-CN</language>
        <copyright>All rights reserved 2026, 老汪洞察</copyright>
        <item>
            <title><![CDATA[EP022：使用 List.Range 函数]]></title>
            <link>https://docs.xiaoweihome.cn/article/EP022</link>
            <guid>https://docs.xiaoweihome.cn/article/EP022</guid>
            <pubDate>Tue, 13 Jan 2026 00:00:00 GMT</pubDate>
            <content:encoded><![CDATA[<div id="notion-article" class="mx-auto overflow-hidden "><main class="notion light-mode notion-page notion-block-2e76d25d51b580819990fa17679b88e6"><div class="notion-viewport"></div><div class="notion-collection-page-properties"></div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-2e76d25d51b5815d8008da74836b137f"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3A97cc2680-d231-4782-b27b-027985188387%3A%E8%80%81%E6%B1%AA%E6%B4%9E%E5%AF%9F_%E5%85%AC%E4%BC%97%E5%8F%B7_%E9%A1%B6%E9%83%A8_GIF.gif?table=block&amp;id=2e76d25d-51b5-815d-8008-da74836b137f&amp;t=2e76d25d-51b5-815d-8008-da74836b137f" alt="notion image" loading="lazy" decoding="async"/></div></figure><hr class="notion-hr notion-block-2e76d25d51b58186998ffd5d89ed7459"/><div class="notion-text notion-block-2e76d25d51b5804782a0c71f5fcb454f">这一节课讲 <code class="notion-inline-code">List.Range</code> 其实是解决“跨行计算”<b>（如累计求和、移动平均）和</b>“结构重组”（如打印格式制作）的核心武器。</div><div class="notion-text notion-block-2e76d25d51b580f4914dd1ece8031fc7">下面我为你设计1个高频的财务BP实战场景。</div><h4 class="notion-h notion-h3 notion-h-indent-0 notion-block-2e76d25d51b580209339e1da3f52cabe" data-id="2e76d25d51b580209339e1da3f52cabe"><span><div id="2e76d25d51b580209339e1da3f52cabe" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2e76d25d51b580209339e1da3f52cabe" title="一、 核心函数：List.Range"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">一、 核心函数：List.Range</span></span></h4><ul class="notion-list notion-list-disc notion-block-2e76d25d51b5802981daf8b4235d8ebf"><li><b>功能</b>：从列表中截取一段连续的元素，返回一个新的列表。</li></ul><ul class="notion-list notion-list-disc notion-block-2e76d25d51b5805097adf3ed8cc41353"><li><b>语法</b>：<code class="notion-inline-code">List.Range(列表, 偏移量(起始下标), [截取个数])</code></li></ul><ul class="notion-list notion-list-disc notion-block-2e76d25d51b5800ca671c276692cc3b4"><li><b>参数详解</b>：</li><ul class="notion-list notion-list-disc notion-block-2e76d25d51b5800ca671c276692cc3b4"><ol start="1" class="notion-list notion-list-numbered notion-block-2e76d25d51b5802bba7fe424b13c97fd" style="list-style-type:decimal"><li><b>列表 (List)</b>：你要操作的那个源列表。</li></ol><ol start="2" class="notion-list notion-list-numbered notion-block-2e76d25d51b580d783a8e7bfcd729aa8" style="list-style-type:decimal"><li><b>偏移量 (Offset)</b>：从哪个下标开始截取（<b>注意：下标从 0 开始</b>）。</li></ol><ol start="3" class="notion-list notion-list-numbered notion-block-2e76d25d51b580588fb9d89a7b630595" style="list-style-type:decimal"><li><b>截取个数 (Count)</b>：可选参数。如果不填，默认截取后面所有的；如果填了，就截取指定数量。</li></ol></ul></ul><ul class="notion-list notion-list-disc notion-block-2e76d25d51b5800b82fccf7a1d294960"><li><b>示例</b>：</li><ul class="notion-list notion-list-disc notion-block-2e76d25d51b5800b82fccf7a1d294960"><li>列表：{1, 2, 3, 4, 5}</li><li>List.Range({1..5}, 2, 3) -&gt; 从下标2（即数字3）开始，取3个数 -&gt; 返回 {3, 4, 5}。</li><li>List.Range({1..5}, 0, 1) -&gt; 从头开始，取1个数 -&gt; 返回 {1}。</li></ul></ul><hr class="notion-hr notion-block-2e76d25d51b5804f850ef3159d9e1865"/><h4 class="notion-h notion-h3 notion-h-indent-0 notion-block-2e76d25d51b58052ba03f28334ebe03a" data-id="2e76d25d51b58052ba03f28334ebe03a"><span><div id="2e76d25d51b58052ba03f28334ebe03a" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2e76d25d51b58052ba03f28334ebe03a" title="场景：预算执行分析——计算 YTD（年初至今）累计数"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">场景：预算执行分析——计算 YTD（年初至今）累计数</span></span></h4><div class="notion-text notion-block-2e76d25d51b580e7b23ad37567c74deb"><b>【业务背景】</b>
作为营销部的财务BP，你需要按月监控广告费用的使用情况。单纯看当月的“实际 vs 预算”是不够的，因为广告投放有季节性（比如“双11”预算高，但款项可能10月就预付了，或者12月才入账）。
<b>核心痛点</b>：老板不仅要看当月超没超，更要看 <b>“截止到本月，全年累计预算用了多少？累计超支了吗？”</b>（即 YTD Analysis）。</div><div class="notion-text notion-block-2e76d25d51b58030b524d2bd45cffa89"><b>【模拟数据源】</b>
请将以下数据复制到 Excel，创建为表，命名为 <code class="notion-inline-code">BudgetTable</code>。</div><table class="notion-simple-table notion-block-2e76d25d51b580a88ee7de4ef1d8ef83"><tbody><tr class="notion-simple-table-row notion-simple-table-header-row notion-block-2e76d25d51b58094a122dc096258ffbf"><td class="" style="width:120px"><div class="notion-simple-table-cell">月份</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">部门</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">费用科目</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">当月预算(Budget)</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">当月实际(Actual)</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">备注</div></td></tr><tr class="notion-simple-table-row notion-block-2e76d25d51b5808dab14e572c557f33a"><td class="" style="width:120px"><div class="notion-simple-table-cell">2024-01</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">市场部</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">广告推广费</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">100,000</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">85,000</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">春节前投放少</div></td></tr><tr class="notion-simple-table-row notion-block-2e76d25d51b580389fa6dd5f0accbc39"><td class="" style="width:120px"><div class="notion-simple-table-cell">2024-02</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">市场部</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">广告推广费</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">120,000</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">110,000</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">开工季</div></td></tr><tr class="notion-simple-table-row notion-block-2e76d25d51b580e38d04d6ce99fcf93b"><td class="" style="width:120px"><div class="notion-simple-table-cell">2024-03</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">市场部</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">广告推广费</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">150,000</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">165,000</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">新品发布会，略超</div></td></tr><tr class="notion-simple-table-row notion-block-2e76d25d51b580338dcee97e6804a81c"><td class="" style="width:120px"><div class="notion-simple-table-cell">2024-04</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">市场部</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">广告推广费</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">150,000</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">140,000</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">ㅤ</div></td></tr><tr class="notion-simple-table-row notion-block-2e76d25d51b5804b9838d6c43ed59cd9"><td class="" style="width:120px"><div class="notion-simple-table-cell">2024-05</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">市场部</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">广告推广费</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">200,000</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">250,000</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">618预热，提前抢量</div></td></tr><tr class="notion-simple-table-row notion-block-2e76d25d51b580289373f441a503a46f"><td class="" style="width:120px"><div class="notion-simple-table-cell">2024-06</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">市场部</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">广告推广费</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">300,000</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">280,000</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">618大促</div></td></tr><tr class="notion-simple-table-row notion-block-2e76d25d51b580c392f5e94979e46a8f"><td class="" style="width:120px"><div class="notion-simple-table-cell">2024-07</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">市场部</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">广告推广费</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">100,000</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">90,000</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">淡季调整</div></td></tr><tr class="notion-simple-table-row notion-block-2e76d25d51b580c3bafce6a08498719e"><td class="" style="width:120px"><div class="notion-simple-table-cell">2024-08</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">市场部</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">广告推广费</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">100,000</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">105,000</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">ㅤ</div></td></tr><tr class="notion-simple-table-row notion-block-2e76d25d51b580429cd6c4eab78b1c15"><td class="" style="width:120px"><div class="notion-simple-table-cell">2024-09</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">市场部</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">广告推广费</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">150,000</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">140,000</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">准备国庆</div></td></tr><tr class="notion-simple-table-row notion-block-2e76d25d51b58043bc3edc70045a5fae"><td class="" style="width:120px"><div class="notion-simple-table-cell">2024-10</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">市场部</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">广告推广费</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">200,000</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">180,000</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">双11蓄水</div></td></tr><tr class="notion-simple-table-row notion-block-2e76d25d51b580399694e88721e971c6"><td class="" style="width:120px"><div class="notion-simple-table-cell">2024-11</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">市场部</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">广告推广费</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">400,000</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">450,000</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">双11爆发，流量贵</div></td></tr><tr class="notion-simple-table-row notion-block-2e76d25d51b5803f86a1f5d6af566c52"><td class="" style="width:120px"><div class="notion-simple-table-cell">2024-12</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">市场部</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">广告推广费</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">150,000</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">100,000</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">收尾</div></td></tr></tbody></table><div class="notion-text notion-block-2e76d25d51b5809b9401c257da2be748"><b>【Power Query 解决方案】</b></div><div class="notion-text notion-block-2e76d25d51b58061bf11f418a98de47b">在 Excel 公式里，YTD 只需要 <code class="notion-inline-code">$D$2:D2</code> 下拉即可。但在 PQ 里，数据是无序的集合，我们需要用 <code class="notion-inline-code">List.Range</code> 配合 <code class="notion-inline-code">Index</code> 来“圈”出要累加的范围。</div><div class="notion-text notion-block-2e76d25d51b58067a53af557396164ac"><b>操作步骤与代码解析：</b></div><ol start="1" class="notion-list notion-list-numbered notion-block-2e76d25d51b58051914dd3cffd0384aa" style="list-style-type:decimal"><li><b>加载数据</b>：导入 <code class="notion-inline-code">BudgetTable</code>。</li></ol><ol start="2" class="notion-list notion-list-numbered notion-block-2e76d25d51b58048a315c99a66093b56" style="list-style-type:decimal"><li><b>添加索引（关键）</b>：添加列 -&gt; 索引列 -&gt; <b>从 0 开始</b>。（计算机数数从0开始，这决定了 List.Range 的起始点）。</li></ol><ol start="3" class="notion-list notion-list-numbered notion-block-2e76d25d51b58063b847d2963dec68b9" style="list-style-type:decimal"><li><b>缓冲列（优化性能）</b>：为了防止数据量大时卡顿，我们先把“预算”和“实际”这两列“缓存”到内存里变成列表。</li><ol class="notion-list notion-list-numbered notion-block-2e76d25d51b58063b847d2963dec68b9" style="list-style-type:lower-alpha"><ul class="notion-list notion-list-disc notion-block-2e76d25d51b58068b653e412013d3e75"><li>在高级编辑器里，在 <code class="notion-inline-code">添加索引</code> 步骤后加入：</li></ul></ol></ol><ol start="4" class="notion-list notion-list-numbered notion-block-2e76d25d51b58003a7a4dcdb13d7701f" style="list-style-type:decimal"><li><b>计算 YTD 预算</b>：添加自定义列，名为 <code class="notion-inline-code">YTD_预算</code>。</li><ol class="notion-list notion-list-numbered notion-block-2e76d25d51b58003a7a4dcdb13d7701f" style="list-style-type:lower-alpha"><ul class="notion-list notion-list-disc notion-block-2e76d25d51b580af8de9e042965f66e7"><li><b>深度解读</b>：</li><ul class="notion-list notion-list-disc notion-block-2e76d25d51b580af8de9e042965f66e7"><li><code class="notion-inline-code">ListBudget</code>：我要切的大蛋糕（整年预算列表）。</li><li><code class="notion-inline-code">0</code>：从第 1 个数（1月）开始切。</li><li><code class="notion-inline-code">[索引]+1</code>：切几个？如果当前是3月（索引是2），我就要切 2+1=3 个数（1月、2月、3月）。</li><li><code class="notion-inline-code">List.Sum</code>：把切下来的这块蛋糕加起来。</li></ul></ul></ol></ol><ol start="5" class="notion-list notion-list-numbered notion-block-2e76d25d51b58026a2adf4312d0eb91b" style="list-style-type:decimal"><li><b>计算 YTD 实际</b>：同样添加自定义列，名为 <code class="notion-inline-code">YTD_实际</code>。</li><ol class="notion-list notion-list-numbered notion-block-2e76d25d51b58026a2adf4312d0eb91b" style="list-style-type:lower-alpha"></ol></ol><div class="notion-text notion-block-2e76d25d51b580e5ab00d460243029ad"><b>【财务BP视角价值】</b>
做完这一步，你就可以直接添加一列 <code class="notion-inline-code">[YTD_实际] - [YTD_预算]</code>。
你会发现，虽然 5 月份单月超支了 5 万（25万-20万），但看 YTD 数据，前 5 个月累计预算 72万，累计实际 75万，其实整体只超了 3万。<b>这就是 YTD 分析帮助管理层平滑波动、理性决策的价值。</b></div><hr class="notion-hr notion-block-2e76d25d51b5801e84b5ca4b808c5f92"/><div class="notion-blank notion-block-2e76d25d51b580c7a6f1d9d1359bb864"> </div><blockquote class="notion-quote notion-block-2e76d25d51b581e5984cfd7182b213a9"><div>【扫码识别下发二维码，获取本文使用到的及历史以来提及、发布的相关精选和原创资料，和我们一起充电，加入后可<b>享受每月6次免费咨询提问，帮助解决您的特定问题</b>！】</div></blockquote><div class="notion-blank notion-block-2e76d25d51b580d2b669d5f5e7a48d58"> </div><div class="notion-text notion-block-2e76d25d51b5818d9afee7268bcedc17">如果本篇文章对您有帮助或启发，请帮我们<span class="notion-red"><code class="notion-inline-code">点赞、转发、推荐、关注</code></span>，让更多想转型财务BP、锻造<span class="notion-red"><code class="notion-inline-code">数据分析和可视化洞察能力</code></span>的财务同行们看到，关注<code class="notion-inline-code">【老汪洞察】</code>，不迷路！</div><div class="notion-row notion-block-2e76d25d51b581b29dcbe602e2b6e31d"><div class="notion-column notion-block-2e76d25d51b581528143d2ec0682d8c2" style="width:calc((100% - (1 * min(32px, 4vw))) * 0.5)"><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-2e76d25d51b581b1ba06c79961b35c29"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3A051528e2-bd6a-4484-9116-875355c9ef00%3A%E5%BE%AE%E4%BF%A1%E5%9B%BE%E7%89%87_20251120165137_183_147.jpg?table=block&amp;id=2e76d25d-51b5-81b1-ba06-c79961b35c29&amp;t=2e76d25d-51b5-81b1-ba06-c79961b35c29" alt="notion image" loading="lazy" decoding="async"/></div></figure></div><div class="notion-spacer"></div><div class="notion-column notion-block-2e76d25d51b581caa43ee15cb6f92599" style="width:calc((100% - (1 * min(32px, 4vw))) * 0.5)"><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-2e76d25d51b581fa8a02e37d301da0f9"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3Af5bedd0e-71d0-4bcf-844e-f87c0a90b4e5%3A%E6%B5%B7%E6%8A%A5_(2).png?table=block&amp;id=2e76d25d-51b5-81fa-8a02-e37d301da0f9&amp;t=2e76d25d-51b5-81fa-8a02-e37d301da0f9" alt="notion image" loading="lazy" decoding="async"/></div></figure></div><div class="notion-spacer"></div></div><div class="notion-blank notion-block-2e76d25d51b5813a8c28e8a5309a0281"> </div><blockquote class="notion-quote notion-block-2e76d25d51b5819c92e3dea103c98936"><div><span class="notion-orange"><b>温馨提示</b></span></div></blockquote><div class="notion-callout notion-gray_background_co notion-block-2e76d25d51b5815c9275ff6397488b8a"><div class="notion-page-icon-inline notion-page-icon-span"><span class="notion-page-icon" role="img" aria-label="🙏🏻">🙏🏻</span></div><div class="notion-callout-text"><span class="notion-red"><b>如果您不想错过</b></span><span class="notion-default"><code class="notion-inline-code"><b>【老汪洞察】</b></code></span><span class="notion-red"><b>的文章，请将我们设为&quot;星标&quot;，这样每次最新文章推送才会第一时间出现在您的订阅列表里。
</b></span><span class="notion-default"><b>方法：</b></span><span class="notion-red"><b>点击文章页面左上角蓝色文字“</b></span><span class="notion-default"><code class="notion-inline-code"><b>老汪洞察</b></code></span><span class="notion-red"><b>”进入主页，点击</b></span><span class="notion-default"><code class="notion-inline-code"><b>关注</b></code></span><span class="notion-red"><b>后，再点主页</b></span><span class="notion-default"><code class="notion-inline-code"><b>右上角&quot;...&quot;</b></code></span><span class="notion-red"><b>，然后选择</b></span><span class="notion-default"><code class="notion-inline-code"><b>&quot;设为星标&quot;</b></code></span><span class="notion-red"><b>，即可完成，感谢您的支持。</b></span></div></div><div class="notion-blank notion-block-2e76d25d51b581618d98f3c4a2e06926"> </div></main></div>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[EP007、EP008：PowerQuery合并查询的6大连接神器详细解读：左外、右外、完全外、内部、反左、反右]]></title>
            <link>https://docs.xiaoweihome.cn/article/2946d25d-51b5-809c-8d8e-da56b566a655</link>
            <guid>https://docs.xiaoweihome.cn/article/2946d25d-51b5-809c-8d8e-da56b566a655</guid>
            <pubDate>Wed, 22 Oct 2025 00:00:00 GMT</pubDate>
            <content:encoded><![CDATA[<div id="notion-article" class="mx-auto overflow-hidden "><main class="notion light-mode notion-page notion-block-2946d25d51b5809c8d8eda56b566a655"><div class="notion-viewport"></div><div class="notion-collection-page-properties"></div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-2946d25d51b581099ff3f98e09b5e493"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3A97cc2680-d231-4782-b27b-027985188387%3A%E8%80%81%E6%B1%AA%E6%B4%9E%E5%AF%9F_%E5%85%AC%E4%BC%97%E5%8F%B7_%E9%A1%B6%E9%83%A8_GIF.gif?table=block&amp;id=2946d25d-51b5-8109-9ff3-f98e09b5e493&amp;t=2946d25d-51b5-8109-9ff3-f98e09b5e493" alt="notion image" loading="lazy" decoding="async"/></div></figure><hr class="notion-hr notion-block-2946d25d51b58166a103fdcbc229c8a5"/><div class="notion-text notion-block-2946d25d51b58038bbbdebcd19931180">在Excel的单元格区域处理数据时，我们经常用到一个叫做VLOOKUP的匹配函数，特定情况下非常好用吗，但也有非常明显的短板和不足，那么来匹配表与表之间的数据，有没有一个类似的功能呢？</div><div class="notion-text notion-block-2d16d25d51b58023b707f7716e9992c0">答案肯定是有的，这就是在Power Query环境下的合并查询功能，可以将其称之为“超级VLOOKUP”，这个称呼，可以说是对Power Query合并查询功能<b>最贴切、最形象、也是最经典的入门级描述</b>。</div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-2946d25d51b580c88e4af4cc1a498573"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:528px;max-width:100%;flex-direction:column"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3A93972cec-573a-4645-b8b7-4c5309e6d490%3Aimage_(6).png?table=block&amp;id=2946d25d-51b5-80c8-8e4a-f4cc1a498573&amp;t=2946d25d-51b5-80c8-8e4a-f4cc1a498573" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-text notion-block-2946d25d51b58098a814cf01055850fb">如上图所示，当我们决定对两个表进行合并查询时，会让我们选择合并查询的6大种类，我称之为6大神器，今天我们就把这6大神器进行一一的讲解。</div><div class="notion-text notion-block-2946d25d51b580778559e01ddb94ba5d">我们来设计两个非常简单、但足以说明问题的Excel表样：<b>一个</b><code class="notion-inline-code"><b>“员工表”</b></code><b>和一个</b><code class="notion-inline-code"><b>“项目分配表”</b></code>。</div><div class="notion-text notion-block-2946d25d51b5808ea73dce76a316bda0"><b>核心业务场景</b>：公司里有一份完整的员工名单，同时还有一份项目分配记录，我们想通过分析这两张表，了解员工的参与项目情况。</div><hr class="notion-hr notion-block-2946d25d51b580ed9c35d54bdfe1b42f"/><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-2946d25d51b580259f62cd3323625211" data-id="2946d25d51b580259f62cd3323625211"><span><div id="2946d25d51b580259f62cd3323625211" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2946d25d51b580259f62cd3323625211" title="准备两个Excel表样"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">准备两个Excel表样</span></span></h3><div class="notion-text notion-block-2946d25d51b5809c9df3c8abed776bc3">如下图，创建两个Excel文件，或者在一个Excel文件的两个工作表中，创建以下数据。<b>强烈建议将它们分别</b><code class="notion-inline-code"><b>“格式化为表格”</b></code><b>，即不要以单元格区域的形式在Excel表中列示</b>，并命名为Employees和Projects。</div><div class="notion-text notion-block-2946d25d51b5807e943fcdc252483dae"><b>表1: 员工表 (Employees) — Sheet A</b></div><div class="notion-text notion-block-2946d25d51b58066ad37d999ad087d39">这张表是公司的员工花名册，包含了所有在职员工。</div><table class="notion-simple-table notion-block-2946d25d51b58031a2a1e9187857c09d"><tbody><tr class="notion-simple-table-row notion-block-2946d25d51b5809c939fe3070af6e6f0"><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>EmployeeID</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>EmployeeName</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>Department</b></div></td></tr><tr class="notion-simple-table-row notion-block-2946d25d51b580b89752f65a68db6032"><td class="" style="width:120px"><div class="notion-simple-table-cell">E01</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">张三</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">销售部</div></td></tr><tr class="notion-simple-table-row notion-block-2946d25d51b580c1ad40dd163c5940b9"><td class="" style="width:120px"><div class="notion-simple-table-cell">E02</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">李四</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">研发部</div></td></tr><tr class="notion-simple-table-row notion-block-2946d25d51b580c4b965e5e8a23f0090"><td class="" style="width:120px"><div class="notion-simple-table-cell">E03</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">王五</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">销售部</div></td></tr><tr class="notion-simple-table-row notion-block-2946d25d51b58020b98fd6e8703a5f9c"><td class="" style="width:120px"><div class="notion-simple-table-cell">E04</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">赵六</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">人事部</div></td></tr></tbody></table><div class="notion-text notion-block-2946d25d51b580bea041d5055af55546"><b>表2: 项目分配表 (Projects) — Sheet B</b></div><div class="notion-text notion-block-2946d25d51b5808ca08ad5db636bcd08">这张表记录了当前正在进行的几个项目，以及被分配到项目上的员工。</div><table class="notion-simple-table notion-block-2946d25d51b580cb8c3df1176f8c8ea9"><tbody><tr class="notion-simple-table-row notion-block-2946d25d51b580938a2ac5188f201a87"><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>ProjectName</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>AssignedEmployeeID</b></div></td></tr><tr class="notion-simple-table-row notion-block-2946d25d51b580009c97e3e256517ee6"><td class="" style="width:120px"><div class="notion-simple-table-cell">项目A</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">E01</div></td></tr><tr class="notion-simple-table-row notion-block-2946d25d51b58062b4daf4a5d768f159"><td class="" style="width:120px"><div class="notion-simple-table-cell">项目A</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">E03</div></td></tr><tr class="notion-simple-table-row notion-block-2946d25d51b58029951ed4480cc7958a"><td class="" style="width:120px"><div class="notion-simple-table-cell">项目B</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">E02</div></td></tr><tr class="notion-simple-table-row notion-block-2946d25d51b580aab5bff907e22a94a7"><td class="" style="width:120px"><div class="notion-simple-table-cell">项目C</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">E05</div></td></tr></tbody></table><div class="notion-text notion-block-2946d25d51b58066b768c95a769eaaf4"><b>关键信息</b>：</div><ul class="notion-list notion-list-disc notion-block-2946d25d51b580888fbaead01cfc68fc"><li><b>赵六(E04)</b>在员工表里，但没有被分配任何项目。</li></ul><ul class="notion-list notion-list-disc notion-block-2946d25d51b58032b88ac20d1d711633"><li><b>E05</b>这个员工ID被分配到了项目C，但他/她并<b>不在</b>我们的员工表里（可能是一位外部顾问或已离职员工）。</li></ul><hr class="notion-hr notion-block-2946d25d51b5803f8270d91b1124faa6"/><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-2946d25d51b58032ab06da85bb213c23" data-id="2946d25d51b58032ab06da85bb213c23"><span><div id="2946d25d51b58032ab06da85bb213c23" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2946d25d51b58032ab06da85bb213c23" title="在Power Query中演示“六大神器”"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">在Power Query中演示“六大神器”</span></span></h3><div class="notion-text notion-block-2946d25d51b58076a400e26e0c49c49a">现在，我们将这两个表加载到Power Query中，然后以<code class="notion-inline-code">Employees表</code>为主表，<code class="notion-inline-code">Projects表</code>为要合并的表，来演示六种不同的连接类型。匹配的键是<code class="notion-inline-code">[EmployeeID]</code>和<code class="notion-inline-code">[AssignedEmployeeID]</code>。</div><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-2946d25d51b580cabfd4f4406cd677a0" data-id="2946d25d51b580cabfd4f4406cd677a0"><span><div id="2946d25d51b580cabfd4f4406cd677a0" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2946d25d51b580cabfd4f4406cd677a0" title="1.左外部连接 — “以我为主，匹配你”"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">1.左外部连接 — “以我为主，匹配你”</span></span></h4><ul class="notion-list notion-list-disc notion-block-2946d25d51b580dc931bc115e686e796"><li><b>业务问题</b>：“我想看到<b>所有</b>员工的列表，并在他们旁边列出他们参与的项目（如果没有，就为空）。”</li></ul><ul class="notion-list notion-list-disc notion-block-2946d25d51b58025b750d97c9eb97c2d"><li><b>这正是在Excel单元格数据处理中的VLOOKUP能做到的。</b></li></ul><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-2946d25d51b580eb9c11e08621d5a2f1"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:480px;max-width:100%;flex-direction:column"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3A4fbb530d-fe12-4d9a-b00a-7f68efcd3b8a%3AImage_fx_(4).jpg?table=block&amp;id=2946d25d-51b5-80eb-9c11-e08621d5a2f1&amp;t=2946d25d-51b5-80eb-9c11-e08621d5a2f1" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-text notion-block-2946d25d51b5800eb078e99d76fe2a75"><b>结果：</b></div><table class="notion-simple-table notion-block-2946d25d51b5807bb7c1c8c89695a703"><tbody><tr class="notion-simple-table-row notion-block-2946d25d51b580b58268db1ba6e247bd"><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>EmployeeID</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>EmployeeName</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>Department</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>ProjectName</b></div></td></tr><tr class="notion-simple-table-row notion-block-2946d25d51b580abb4abf38598cfa05c"><td class="" style="width:120px"><div class="notion-simple-table-cell">E01</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">张三</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">销售部</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">项目A</div></td></tr><tr class="notion-simple-table-row notion-block-2946d25d51b580d8bafefe8e0683a217"><td class="" style="width:120px"><div class="notion-simple-table-cell">E02</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">李四</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">研发部</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">项目B</div></td></tr><tr class="notion-simple-table-row notion-block-2946d25d51b580fbbe5fd0406c283bd7"><td class="" style="width:120px"><div class="notion-simple-table-cell">E03</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">王五</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">销售部</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">项目A</div></td></tr><tr class="notion-simple-table-row notion-block-2946d25d51b5802dabe0c2f364879519"><td class="" style="width:120px"><div class="notion-simple-table-cell">E04</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">赵六</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">人事部</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><em>null</em></div></td></tr></tbody></table><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-2946d25d51b580f48706d8a6e6de8d63" data-id="2946d25d51b580f48706d8a6e6de8d63"><span><div id="2946d25d51b580f48706d8a6e6de8d63" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2946d25d51b580f48706d8a6e6de8d63" title="2.右外部连接 — “以你为主，匹配我”"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">2.右外部连接 — “以你为主，匹配我”</span></span></h4><ul class="notion-list notion-list-disc notion-block-2946d25d51b5802bba35f72291ab1dca"><li><b>业务问题</b>：“我想看到<b>所有</b>被分配了项目的记录，并找出对应的员工信息（如果员工不存在，也要保留这条项目记录）。”</li></ul><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-2946d25d51b580cfa172c8a10fffc695"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:432px;max-width:100%;flex-direction:column"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3A5ee34f4d-8483-4ac0-97a0-5d50a7fc2ad3%3AImage_fx_(5).jpg?table=block&amp;id=2946d25d-51b5-80cf-a172-c8a10fffc695&amp;t=2946d25d-51b5-80cf-a172-c8a10fffc695" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-text notion-block-2946d25d51b580899545f0b148e75143"><b>结果：</b></div><table class="notion-simple-table notion-block-2946d25d51b580d7916bf2c5739c4cad"><tbody><tr class="notion-simple-table-row notion-block-2946d25d51b5806a92befc1ee30deca2"><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>ProjectName</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>AssignedEmployeeID</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>EmployeeName</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>Department</b></div></td></tr><tr class="notion-simple-table-row notion-block-2946d25d51b580a29409d7b5bb2151e4"><td class="" style="width:120px"><div class="notion-simple-table-cell">项目A</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">E01</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">张三</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">销售部</div></td></tr><tr class="notion-simple-table-row notion-block-2946d25d51b5801e8636ef5b95ca8a00"><td class="" style="width:120px"><div class="notion-simple-table-cell">项目A</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">E03</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">王五</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">销售部</div></td></tr><tr class="notion-simple-table-row notion-block-2946d25d51b580d18159d70fccfe71df"><td class="" style="width:120px"><div class="notion-simple-table-cell">项目B</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">E02</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">李四</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">研发部</div></td></tr><tr class="notion-simple-table-row notion-block-2946d25d51b5806f8387c09fbeb45fbb"><td class="" style="width:120px"><div class="notion-simple-table-cell">项目C</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">E05</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><em>null</em></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><em>null</em></div></td></tr></tbody></table><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-2946d25d51b580f2bf2ccbdae896e785" data-id="2946d25d51b580f2bf2ccbdae896e785"><span><div id="2946d25d51b580f2bf2ccbdae896e785" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2946d25d51b580f2bf2ccbdae896e785" title="3.完全外部连接 — “宁可错杀，不可放过”"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">3.完全外部连接 — “宁可错杀，不可放过”</span></span></h4><ul class="notion-list notion-list-disc notion-block-2946d25d51b5800b806dca2e39872b03"><li><b>业务问题</b>：“我想看到<b>所有</b>的员工和<b>所有</b>的项目分配记录，无论它们是否能匹配上，给我一个最全的大列表。”</li></ul><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-2946d25d51b580ac8366f65ad92f9ca7"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:480px;max-width:100%;flex-direction:column"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3A43a28ff0-03f9-4607-982a-125cf27c307a%3AImage_fx_(6).jpg?table=block&amp;id=2946d25d-51b5-80ac-8366-f65ad92f9ca7&amp;t=2946d25d-51b5-80ac-8366-f65ad92f9ca7" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-text notion-block-2946d25d51b580799f5bf590a0c1b1d1"><b>结果：</b></div><table class="notion-simple-table notion-block-2946d25d51b580b88b1cf06812ae166d"><tbody><tr class="notion-simple-table-row notion-block-2946d25d51b580f29262f039e07cb4cb"><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>EmployeeID</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>EmployeeName</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>Department</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>ProjectName</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>AssignedEmployeeID</b></div></td></tr><tr class="notion-simple-table-row notion-block-2946d25d51b5809aa8fcfee68e6261a1"><td class="" style="width:120px"><div class="notion-simple-table-cell">E01</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">张三</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">销售部</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">项目A</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">E01</div></td></tr><tr class="notion-simple-table-row notion-block-2946d25d51b580918874f18f469bb86d"><td class="" style="width:120px"><div class="notion-simple-table-cell">E02</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">李四</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">研发部</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">项目B</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">E02</div></td></tr><tr class="notion-simple-table-row notion-block-2946d25d51b580d9bc66c1014577f4ad"><td class="" style="width:120px"><div class="notion-simple-table-cell">E03</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">王五</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">销售部</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">项目A</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">E03</div></td></tr><tr class="notion-simple-table-row notion-block-2946d25d51b5806d8b71f61ffe0f30d6"><td class="" style="width:120px"><div class="notion-simple-table-cell">E04</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">赵六</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">人事部</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><em>null</em></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><em>null</em></div></td></tr><tr class="notion-simple-table-row notion-block-2946d25d51b5803092efd19c02c369ef"><td class="" style="width:120px"><div class="notion-simple-table-cell"><em>null</em></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><em>null</em></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><em>null</em></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">项目C</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">E05</div></td></tr></tbody></table><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-2946d25d51b5800a9c4fe11755d67729" data-id="2946d25d51b5800a9c4fe11755d67729"><span><div id="2946d25d51b5800a9c4fe11755d67729" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2946d25d51b5800a9c4fe11755d67729" title="4.内部连接 — “求同存异，只要交集”"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">4.内部连接 — “求同存异，只要交集”</span></span></h4><ul class="notion-list notion-list-disc notion-block-2946d25d51b580eb8f87c2e4b61af574"><li><b>业务问题</b>：“我只想看那些<b>既在员工列表里，又确实被分配了项目</b>的员工信息。”</li></ul><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-2d16d25d51b580c1a431f5e0bb9a16b3"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:480px;max-width:100%;flex-direction:column"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3Aa743e880-77ba-4bf9-8ad8-d49392ccf7af%3A640.webp?table=block&amp;id=2d16d25d-51b5-80c1-a431-f5e0bb9a16b3&amp;t=2d16d25d-51b5-80c1-a431-f5e0bb9a16b3" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-text notion-block-2946d25d51b5806d8840f7e88a43d747"><b>结果：</b></div><table class="notion-simple-table notion-block-2946d25d51b580e09314fa3ae1eea026"><tbody><tr class="notion-simple-table-row notion-block-2946d25d51b580919315dc59cfefa39f"><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>EmployeeID</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>EmployeeName</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>Department</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>ProjectName</b></div></td></tr><tr class="notion-simple-table-row notion-block-2946d25d51b5806a8c7cf8a136320d4e"><td class="" style="width:120px"><div class="notion-simple-table-cell">E01</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">张三</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">销售部</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">项目A</div></td></tr><tr class="notion-simple-table-row notion-block-2946d25d51b580219298f11928bf3c3b"><td class="" style="width:120px"><div class="notion-simple-table-cell">E02</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">李四</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">研发部</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">项目B</div></td></tr><tr class="notion-simple-table-row notion-block-2946d25d51b5804fb248e7d830a05850"><td class="" style="width:120px"><div class="notion-simple-table-cell">E03</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">王五</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">销售部</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">项目A</div></td></tr></tbody></table><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-2946d25d51b5809d95ffcbce418418bf" data-id="2946d25d51b5809d95ffcbce418418bf"><span><div id="2946d25d51b5809d95ffcbce418418bf" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2946d25d51b5809d95ffcbce418418bf" title="5.反左连接 — “找出我方‘单身狗’”"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">5.反左连接 — “找出我方‘单身狗’”</span></span></h4><ul class="notion-list notion-list-disc notion-block-2946d25d51b5802ab2acd4cabf0e5ff8"><li><b>业务问题</b>：“请帮我找出所有<b>在职</b>的员工中，<b>还没有被分配任何项目</b>的人员名单。”</li></ul><ul class="notion-list notion-list-disc notion-block-2946d25d51b5807b82b1d4ab60e6940a"><li><b>这是VLOOKUP绝对做不到的神器！</b></li></ul><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-2d16d25d51b580038c00d52c46f694f8"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:576px;max-width:100%;flex-direction:column"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3A7df85626-5717-4a54-9498-37a819ffb2de%3A5.webp?table=block&amp;id=2d16d25d-51b5-8003-8c00-d52c46f694f8&amp;t=2d16d25d-51b5-8003-8c00-d52c46f694f8" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-text notion-block-2946d25d51b580c8a70ec754f87a3386"><b>结果：</b></div><table class="notion-simple-table notion-block-2946d25d51b580e69a19e314c5c192fb"><tbody><tr class="notion-simple-table-row notion-block-2946d25d51b5802a9159c50eefa5ec7d"><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>EmployeeID</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>EmployeeName</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>Department</b></div></td></tr><tr class="notion-simple-table-row notion-block-2946d25d51b580e49225c20e13514427"><td class="" style="width:120px"><div class="notion-simple-table-cell">E04</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">赵六</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">人事部</div></td></tr></tbody></table><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-2946d25d51b58041aac2d0163610345d" data-id="2946d25d51b58041aac2d0163610345d"><span><div id="2946d25d51b58041aac2d0163610345d" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2946d25d51b58041aac2d0163610345d" title="6.反右连接 — “找出对方‘神秘人’”"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">6.反右连接 — “找出对方‘神秘人’”</span></span></h4><ul class="notion-list notion-list-disc notion-block-2946d25d51b58088aa14fc39ab4f5fbe"><li><b>业务问题</b>：“请帮我检查一下项目分配表，看看有没有哪些被分配的<b>员工ID是无效的</b>（即在我们的员工花名册里根本不存在）。”</li></ul><ul class="notion-list notion-list-disc notion-block-2946d25d51b580d7b6eceef51052327d"><li><b>这同样是VLOOKUP做不到的数据核对利器！</b></li></ul><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-2d16d25d51b580899252f30a3befe3d4"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:624px;max-width:100%;flex-direction:column"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3Af028892c-078f-4963-a82c-af547adb68cf%3A6.webp?table=block&amp;id=2d16d25d-51b5-8089-9252-f30a3befe3d4&amp;t=2d16d25d-51b5-8089-9252-f30a3befe3d4" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-text notion-block-2946d25d51b580c7a086ea20fbacac01"><b>结果：</b></div><table class="notion-simple-table notion-block-2946d25d51b580918ba5e1798c4c6ddb"><tbody><tr class="notion-simple-table-row notion-block-2946d25d51b5802ba286e98a5b744b87"><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>ProjectName</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>AssignedEmployeeID</b></div></td></tr><tr class="notion-simple-table-row notion-block-2946d25d51b580c2bc86da7fb27ee87c"><td class="" style="width:120px"><div class="notion-simple-table-cell">项目C</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">E05</div></td></tr></tbody></table><div class="notion-text notion-block-2946d25d51b5807a9e1ad0b2466b5b88">通过这两个简单的表样，我们可以清晰地看到，六种不同的连接类型，就像六把功能各异的“瑞士军刀”，能够精确地回答各种复杂的业务问题，实现从简单的数据匹配到深度的数据核对与审计。</div><hr class="notion-hr notion-block-2946d25d51b581be90ccd61d35143782"/><blockquote class="notion-quote notion-block-2946d25d51b58128b37af1a9394c2785"><div>【点击文末<b>“阅读原文”</b>，获取本文使用到的及历史以来提及、发布的相关精选和原创资料，和我们一起充电，加入后可<b>享受每月6次免费咨询提问，帮助解决您的特定问题</b>！】</div></blockquote><hr class="notion-hr notion-block-2946d25d51b5818c837ce4fb993ae399"/><div class="notion-text notion-block-2946d25d51b5819bb75bf72fa3b5ab95">如果本篇文章对您有帮助或启发，请帮我们<span class="notion-red"><code class="notion-inline-code">点赞、转发、推荐、关注</code></span>，让更多想转型财务BP、锻造<span class="notion-red"><code class="notion-inline-code">数据分析和可视化洞察能力</code></span>的财务同行们看到，关注<code class="notion-inline-code">【老汪洞察】</code>，不迷路！</div><div class="notion-text notion-block-2946d25d51b581ec8f54e90e0fa5e594">若想获得更多<code class="notion-inline-code">制造业成本本管控、核算、全面预算、业财融合</code>方面的落地实操干货，加入我们的大本营是你的不二之选，快点击下方卡片看看吧！</div><div class="notion-blank notion-block-2946d25d51b58129ae96eb9b2ef74bb5"> </div><blockquote class="notion-quote notion-block-2946d25d51b58112b502ced89f1604f1"><div><span class="notion-orange"><b>温馨提示</b></span></div></blockquote><div class="notion-callout notion-gray_background_co notion-block-2946d25d51b58120991bd470ab1da22d"><div class="notion-page-icon-inline notion-page-icon-span"><span class="notion-page-icon" role="img" aria-label="🙏🏻">🙏🏻</span></div><div class="notion-callout-text"><span class="notion-red"><b>如果您不想错过</b></span><span class="notion-default"><code class="notion-inline-code"><b>【老汪洞察】</b></code></span><span class="notion-red"><b>的文章，请将我们设为&quot;星标&quot;，这样每次最新文章推送才会第一时间出现在您的订阅列表里。
</b></span><span class="notion-default"><b>方法：</b></span><span class="notion-red"><b>点击文章页面左上角蓝色文字“</b></span><span class="notion-default"><code class="notion-inline-code"><b>老汪洞察</b></code></span><span class="notion-red"><b>”进入主页，点击</b></span><span class="notion-default"><code class="notion-inline-code"><b>关注</b></code></span><span class="notion-red"><b>后，再点主页</b></span><span class="notion-default"><code class="notion-inline-code"><b>右上角&quot;...&quot;</b></code></span><span class="notion-red"><b>，然后选择</b></span><span class="notion-default"><code class="notion-inline-code"><b>&quot;设为星标&quot;</b></code></span><span class="notion-red"><b>，即可完成，感谢您的支持。</b></span></div></div><div class="notion-blank notion-block-2946d25d51b5812c99c0fafcd0c4f160"> </div></main></div>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[从Power Query到Power BI：￥699完整包年陪跑课程计划]]></title>
            <link>https://docs.xiaoweihome.cn/article/699-oneyear-lessons</link>
            <guid>https://docs.xiaoweihome.cn/article/699-oneyear-lessons</guid>
            <pubDate>Sat, 20 Dec 2025 00:00:00 GMT</pubDate>
            <content:encoded><![CDATA[<div id="notion-article" class="mx-auto overflow-hidden "><main class="notion light-mode notion-page notion-block-2b66d25d51b5805c9cf3e733fe643ce1"><div class="notion-viewport"></div><div class="notion-collection-page-properties"></div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-2b66d25d51b581bba61fc715577881bd"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3A97cc2680-d231-4782-b27b-027985188387%3A%E8%80%81%E6%B1%AA%E6%B4%9E%E5%AF%9F_%E5%85%AC%E4%BC%97%E5%8F%B7_%E9%A1%B6%E9%83%A8_GIF.gif?table=block&amp;id=2b66d25d-51b5-81bb-a61f-c715577881bd&amp;t=2b66d25d-51b5-81bb-a61f-c715577881bd" alt="notion image" loading="lazy" decoding="async"/></div></figure><hr class="notion-hr notion-block-2b66d25d51b58114bd25c1f1f322edca"/><div class="notion-text notion-block-2b76d25d51b580318cccd0099b000bfc">你好，我是老汪。</div><div class="notion-text notion-block-2b76d25d51b58017b9a9c574533a8703">在财务这行摸爬滚打已经14年时间，我见过太多优秀的财务人，因为不懂工具，被原本只需5分钟搞定的数据清洗、汇总、洞察工作，困在办公室直到凌晨。</div><div class="notion-text notion-block-2b76d25d51b580c49e92ded7aec61fc3"><b>Excel不仅仅是电子表格处理，它称得上是财务人手中的剑。</b>但很遗憾，90%的人只用它来<code class="notion-inline-code">切菜（基础操作）</code>，却不知道它其实是一把<code class="notion-inline-code">屠龙刀</code><b>（Excel(界面)+Power Query(清洗)+Power Pivot(建模)+数据透视表/图(呈现)）</b>。</div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-2b76d25d51b58027987dcb078f2af949"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:320px"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3A4bd075ff-b4d6-497e-8b58-8ae39d156ecf%3A38a34aa7-8eb0-4da9-a152-5265723d746a.png?table=block&amp;id=2b76d25d-51b5-8027-987d-cb078f2af949&amp;t=2b76d25d-51b5-8027-987d-cb078f2af949" alt="notion image" loading="lazy" decoding="async"/></div></figure><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-2b76d25d51b5805facf9c09d5ca4abbe" data-id="2b76d25d51b5805facf9c09d5ca4abbe"><span><div id="2b76d25d51b5805facf9c09d5ca4abbe" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2b76d25d51b5805facf9c09d5ca4abbe" title="一、课程整体介绍"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">一、课程整体介绍</span></span></h2><div class="notion-text notion-block-2b76d25d51b58028b163d887b1e026de">在这个为期一年的陪跑计划中，我将摒弃所有花哨的、不落地的理论，直接把我在千亿集团预算总监岗位上实战验证过的<code class="notion-inline-code">“财务数据自动化黄金路径”</code>交付给你。</div><div class="notion-text notion-block-2cf6d25d51b580aa8fb9f2302ee1498c">全程每一节课都是<code class="notion-inline-code"><b>带案例实操讲解</b></code>，从<code class="notion-inline-code"><b>基础UI界面操作入门</b></code>到<code class="notion-inline-code"><b>函数编写进阶</b></code>，再到<code class="notion-inline-code"><b>Pivot关系建模</b></code>，以及最后的<code class="notion-inline-code"><b>可视化看板呈现</b></code>，各个学习阶段分的很细，不管你现在是<code class="notion-inline-code"><b>小白从未接触过的朋友</b></code>，还是已经初步<code class="notion-inline-code"><b>具备基础想要进阶的人士</b></code>，都可以在这里从容高效学习。</div><div class="notion-text notion-block-2b76d25d51b580d6b086ca90df41c1a3">这里不是一堆冷冰冰的视频，而是一套<code class="notion-inline-code"><b>严密的各种财务场景解决方案</b></code>。并且老汪时刻在你的背后提供最强大的支撑，<code class="notion-inline-code">手把手，一对一</code>指导！</div><div class="notion-text notion-block-2cf6d25d51b580b69f6fe125cfcfe09c">我们将通过四个层层递进的阶段，彻底重塑你的工作方式，做出像下面这样高大上又极具洞察说服力的可视化图、表：</div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-2cf6d25d51b5808b9e84c86c6468b85b"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3Ace4599f1-a783-4d67-b413-3327308a40a4%3AWhale-Curve-1.png?table=block&amp;id=2cf6d25d-51b5-808b-9e84-c86c6468b85b&amp;t=2cf6d25d-51b5-808b-9e84-c86c6468b85b" alt="notion image" loading="lazy" decoding="async"/></div></figure><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-2b76d25d51b580d4a333df05e5cb55d7" data-id="2b76d25d51b580d4a333df05e5cb55d7"><span><div id="2b76d25d51b580d4a333df05e5cb55d7" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2b76d25d51b580d4a333df05e5cb55d7" title="第一阶段：解放双手（UI 操作篇）"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>第一阶段：解放双手（UI 操作篇）</b></span></span></h3><ul class="notion-list notion-list-disc notion-block-2b76d25d51b58051856efc956422e62f"><li>我们先不谈代码，只用鼠标。教你用<code class="notion-inline-code"> Power Query </code>的界面功能，像“录像机”一样记录下你清洗报表的每一步。以后再乱的数据发过来，你只需点击“刷新”，一切自动完成。</li></ul><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-2b76d25d51b580fc8e64f6d692e9fda3" data-id="2b76d25d51b580fc8e64f6d692e9fda3"><span><div id="2b76d25d51b580fc8e64f6d692e9fda3" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2b76d25d51b580fc8e64f6d692e9fda3" title="第二阶段：掌控底层（M 函数篇）"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>第二阶段：掌控底层（M 函数篇）</b></span></span></h3><ul class="notion-list notion-list-disc notion-block-2b76d25d51b580699276f53db22ade84"><li>我们要打开引擎盖，学习<code class="notion-inline-code"> Power Query </code>的核心语言。当你掌握了<code class="notion-inline-code"> M 函数</code>，你就拥有了处理复杂文件汇总、指标计算、非标数据清洗的“魔法”，解决那些<code class="notion-inline-code">鼠标点不出来</code>的难题。</li></ul><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-2b76d25d51b5801db059d96a7ce4d453" data-id="2b76d25d51b5801db059d96a7ce4d453"><span><div id="2b76d25d51b5801db059d96a7ce4d453" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2b76d25d51b5801db059d96a7ce4d453" title="第三阶段：构建大脑（Power Pivot 建模篇）"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>第三阶段：构建大脑（Power Pivot 建模篇）</b></span></span></h3><ul class="notion-list notion-list-disc notion-block-2b76d25d51b5802880dffa1f74071a42"><li>这是财务从“核算”转向“分析”的分水岭。我们将告别卡顿的<code class="notion-inline-code"> VLOOKUP </code>，像搭建乐高一样建立多表关联模型，用<code class="notion-inline-code"> DAX </code>语言编写<code class="notion-inline-code">同比、环比、累计完成率等动态指标</code>，建立真正的业务逻辑。</li></ul><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-2b76d25d51b580119bd9d87cd16d2e41" data-id="2b76d25d51b580119bd9d87cd16d2e41"><span><div id="2b76d25d51b580119bd9d87cd16d2e41" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2b76d25d51b580119bd9d87cd16d2e41" title="第四阶段：呈现价值（数据可视化篇）"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>第四阶段：呈现价值（数据可视化篇）</b></span></span></h3><ul class="notion-list notion-list-disc notion-block-2b76d25d51b5808e8c57e8c214f67c1c"><li>最后，我们要把数据变成老板看得懂的故事。利用<code class="notion-inline-code"> Excel 2021 </code>的原生图表和交互控件，打造出既媲美<code class="notion-inline-code">商业BI</code>，又<code class="notion-inline-code">极具灵活性</code>的动态经营分析仪表板，让你的分析报告成为会议投屏上的焦点。</li></ul><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-2b76d25d51b58004a833ea4c2cddd448" data-id="2b76d25d51b58004a833ea4c2cddd448"><span><div id="2b76d25d51b58004a833ea4c2cddd448" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2b76d25d51b58004a833ea4c2cddd448" title="第五阶段：结尾篇-从Excel到Power BI的过渡课"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>第五阶段：结尾篇-从Excel到Power BI的过渡课</b></span></span></h3><ul class="notion-list notion-list-disc notion-block-2b76d25d51b580d89184c8717447cad9"><li>回顾与总结——<code class="notion-inline-code"> 现代 Excel </code>的全貌；</li></ul><ul class="notion-list notion-list-disc notion-block-2b76d25d51b580208263c31bc9af4bc2"><li><code class="notion-inline-code"> Excel BI </code>的极限与痛点 (为什么可以继续无缝转到<code class="notion-inline-code"> Power BI </code>？)</li></ul><ul class="notion-list notion-list-disc notion-block-2b76d25d51b580898540cb4678ecf390"><li>Excel到<code class="notion-inline-code"> Power BI </code>无缝迁移——见证奇迹的时刻。</li></ul><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-2b76d25d51b5806a9cb8f56263a7dea7" data-id="2b76d25d51b5806a9cb8f56263a7dea7"><span><div id="2b76d25d51b5806a9cb8f56263a7dea7" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2b76d25d51b5806a9cb8f56263a7dea7" title="二、交付内容"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">二、交付内容</span></span></h2><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-2b76d25d51b58000b0b4f91513f9d8f6" data-id="2b76d25d51b58000b0b4f91513f9d8f6"><span><div id="2b76d25d51b58000b0b4f91513f9d8f6" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2b76d25d51b58000b0b4f91513f9d8f6" title="✅体系化的视频录播课程（持续更新）"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>✅体系化的视频录播课程（持续更新）</b></span></span></h3><div class="notion-text notion-block-2b76d25d51b580939057c4813dc6aa24">我会将我14年的实战经验，浓缩成一套从入门到精通的<code class="notion-inline-code"><b> Excel BI 课程体系</b></code>。涵盖<code class="notion-inline-code"><b> Power Query 数据清洗</b></code>、<code class="notion-inline-code"><b>Power Pivot 建模</b></code>、<code class="notion-inline-code"><b>DAX 指标编写</b></code>以及<code class="notion-inline-code"><b>可视化大屏</b></code>制作，全程案例实战讲解，最后还有大型项目级案例实战详解，比如<code class="notion-inline-code"><b>预算量本利模型搭建</b></code>、<code class="notion-inline-code"><b>经营分析模型搭建</b></code>、<code class="notion-inline-code"><b>经营管理报表模型搭建</b></code>、<code class="notion-inline-code">销售、存货管理相关模型搭建</code>等等。不讲虚的，只讲财务工作中用得上的。</div><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-2b76d25d51b5809487eae54cc2a2f21c" data-id="2b76d25d51b5809487eae54cc2a2f21c"><span><div id="2b76d25d51b5809487eae54cc2a2f21c" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2b76d25d51b5809487eae54cc2a2f21c" title="✅微信好友一对一 + 远程手把手教学（核心价值）"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>✅微信好友一对一 + 远程手把手教学（核心价值）</b></span></span></h3><div class="notion-text notion-block-2b76d25d51b5803f9978c9204f7d2200">这是这个班<code class="notion-inline-code"><b>最大的价值</b></code>，就是你在工作中遇到任何数据处理或者财务业财融合方面的难题，可以随时微信找我，为大家提供免费咨询。</div><div class="notion-text notion-block-2b76d25d51b5804e804df7e5eee2fcea">文字说不清楚？直接上<code class="notion-inline-code"><b> 向日葵/TeamViewer/腾讯会议 </b></code>远程控制！我会直接操作你的电脑，看着你的数据，手把手教你改公式、调模型。这就相当于你请了一个专属的财务数据技术顾问。</div><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-2b76d25d51b58032a7c2dfd526325d8e" data-id="2b76d25d51b58032a7c2dfd526325d8e"><span><div id="2b76d25d51b58032a7c2dfd526325d8e" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2b76d25d51b58032a7c2dfd526325d8e" title="✅收集共性问题内部直播辅导"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>✅收集共性问题内部直播辅导</b></span></span></h3><div class="notion-text notion-block-2b76d25d51b580e4b864c83b1afaa205">我们会收集学员的问题，不定期组织仅限班内学员参加的<code class="notion-inline-code"><b>闭门直播</b></code>。我会选取大家在实际工作中遇到的<code class="notion-inline-code"><b>典型问题逐一进行拆解</b></code>，或者分享我最新的研究成果。大家开麦交流，共同进步。</div><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-2b76d25d51b580ef8bb4d2413d771deb" data-id="2b76d25d51b580ef8bb4d2413d771deb"><span><div id="2b76d25d51b580ef8bb4d2413d771deb" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2b76d25d51b580ef8bb4d2413d771deb" title="✅项目级咨询与方案建议"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>✅项目级咨询与方案建议</b></span></span></h3><div class="notion-text notion-block-2b76d25d51b580cf98d8dba2b0a3d710">如果你正在负责<code class="notion-inline-code"><b>公司的预算系统搭建</b></code>、<code class="notion-inline-code"><b>经营分析报告改版</b></code>等具体项目，我会以财务总监的视角，为你提供<code class="notion-inline-code"><b>架构设计、指标体系搭建</b></code>等深度的意见和建议。</div><div class="notion-blank notion-block-2cf6d25d51b580719389e544c0fafd4f"> </div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-2b76d25d51b580bb8f2eef9d5402bce0" data-id="2b76d25d51b580bb8f2eef9d5402bce0"><span><div id="2b76d25d51b580bb8f2eef9d5402bce0" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2b76d25d51b580bb8f2eef9d5402bce0" title="三、课程完整大纲"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">三、课程完整大纲</span></span></h2><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-2b76d25d51b580cda89ef40771d8f255" data-id="2b76d25d51b580cda89ef40771d8f255"><span><div id="2b76d25d51b580cda89ef40771d8f255" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2b76d25d51b580cda89ef40771d8f255" title="第（1）阶段：界面操作与M语言启蒙"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>第（1）阶段：界面操作与M语言启蒙</b></span></span></h3><div class="notion-text notion-block-2b76d25d51b580aaabe6f476669b69c4">本阶段聚焦于Power Query的“UI界面优先”<b>策略，通过鼠标点击完成 90% 的日常工作，同时开始建立</b>“步骤即代码”的初步认知。</div><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-2b76d25d51b580ad9841c58e14975698" data-id="2b76d25d51b580ad9841c58e14975698"><span><div id="2b76d25d51b580ad9841c58e14975698" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2b76d25d51b580ad9841c58e14975698" title="第一章：数据导入与基础清洗规范"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>第一章：数据导入与基础清洗规范</b></span></span></h4><div class="notion-text notion-block-2b76d25d51b5809ab920ce659bd305b3"><em>建立正确的数据观，告别合并单元格，学会“看”数据。</em></div><div class="notion-text notion-block-2cf6d25d51b580e29f19eb8de6fda2e2"><b>（该部分基础课，是纯小白入门感性体验课，如果之前已经了解过PQ+PP这套解决方案并有基础的同学可以直接跳过。）</b></div><table class="notion-simple-table notion-block-2b76d25d51b580a1af85c19ed51531f4"><tbody><tr class="notion-simple-table-row notion-block-2b76d25d51b580c0a112f5c315febbb8"><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>笔记文档直达</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>对应视频</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>课程内容</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>幕后核心函数</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>核心知识点与原理</b></div></td></tr><tr class="notion-simple-table-row notion-block-2cf6d25d51b5809d9122d8fd4c3e15d6"><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>EP000（无笔记文档，看视频操作即可）</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>EP000</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>前言</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>前言</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>前言</b></div></td></tr><tr class="notion-simple-table-row notion-block-2b76d25d51b5804a8c36d7d4e7e6ed64"><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>EP001（无笔记文档，看视频操作即可）</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>EP001</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>再见，合并单元格！数据清洗第一步，从这里开始</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><code class="notion-inline-code">Source</code><span style="padding:0.5em"></span><code class="notion-inline-code"> Navigation</code></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>思维转变：</b> 为什么数据库思维痛恨合并单元格？建立“一维表”的认知。</div></td></tr><tr class="notion-simple-table-row notion-block-2b76d25d51b580468c35f8e97fb05807"><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>EP002（无笔记文档，看视频操作即可）</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>EP002</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>3步导入数据 &amp; 轻松删除无用列</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><code class="notion-inline-code">Table.PromoteHeaders</code><span style="padding:0.5em"></span><code class="notion-inline-code"> Table.RemoveColumns</code></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>基础操作：</b> 提升标题（Headers）的重要性；选择列 vs 删除列的维护性差异。</div></td></tr><tr class="notion-simple-table-row notion-block-2b76d25d51b58020bf53c8fa38c1c288"><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>EP003（无笔记文档，看视频操作即可）</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>EP003</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>高手都在用的数据统计神技，从此告别无效滚动！</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><code class="notion-inline-code">Table.Profile</code> (视图功能)</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>数据概览：</b> 利用“视图”选项卡下的“列质量/分布/配置文件”快速发现脏数据，告别肉眼滚屏检查。</div></td></tr><tr class="notion-simple-table-row notion-block-2b76d25d51b58068b78efd56f7ba0940"><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>EP004（无笔记文档，看视频操作即可）</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>EP004</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>三大核心技能：拆分列、向下填充与“转置”大法！</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><code class="notion-inline-code">Table.SplitColumn</code><span style="padding:0.5em"></span><code class="notion-inline-code"> Table.FillDown</code><span style="padding:0.5em"></span><code class="notion-inline-code"> Table.Transpose</code></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>必会神技：</b> 解决中国式报表（层级表头）的三大杀器；<code class="notion-inline-code">FillDown </code>是处理合并单元格的神器。</div></td></tr><tr class="notion-simple-table-row notion-block-2b76d25d51b580ad94a8e7f893480403"><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>EP005（无笔记文档，看视频操作即可）</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>EP005</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>避坑指南：数据源路径更改与“应用的步骤”深度解析</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><code class="notion-inline-code">File.Contents</code>, <code class="notion-inline-code">Let...in </code>(概念)</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>工程思维：</b> 绝对路径 vs 相对路径；理解右侧“应用的步骤”就是 M 语言的“录像带”。</div></td></tr></tbody></table><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-2b76d25d51b58066a23bccf42c7249c7" data-id="2b76d25d51b58066a23bccf42c7249c7"><span><div id="2b76d25d51b58066a23bccf42c7249c7" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2b76d25d51b58066a23bccf42c7249c7" title="第二章：多表关联与逻辑运算 (合并查询)"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>第二章：多表关联与逻辑运算 (合并查询)</b></span></span></h4><div class="notion-text notion-block-2b76d25d51b580309cc0ee2352bbb62a"><em>彻底终结 VLOOKUP，理解关系型数据的连接逻辑。</em></div><table class="notion-simple-table notion-block-2b76d25d51b5800e8f2ffc22a54806c6"><tbody><tr class="notion-simple-table-row notion-block-2b76d25d51b580d4b630d7d80484a859"><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>笔记文档直达</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>对应视频</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>课程内容</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>幕后核心函数</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>核心知识点与原理</b></div></td></tr><tr class="notion-simple-table-row notion-block-2b76d25d51b5807f9bb4da9fa1e56c98"><td class="" style="width:120px"><div class="notion-simple-table-cell"><b><a class="notion-link" href="/2946d25d51b580608505c45c7d90b1e2">EP006</a></b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>EP006</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>再见 VLOOKUP：合并查询基础</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><code class="notion-inline-code">Table.NestedJoin</code>, <code class="notion-inline-code">Table.ExpandTableColumn</code></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>核心概念：</b> 什么是“左外部连接”？为什么 PQ 比 VLOOKUP 快且不易出错？</div></td></tr><tr class="notion-simple-table-row notion-block-2b76d25d51b5800f8f85c0b34edaea36"><td class="" style="width:120px"><div class="notion-simple-table-cell"><b><a class="notion-link" href="/2946d25d51b5809c8d8eda56b566a655">EP007</a></b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>EP007</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>合并进阶：向左查找与多条件匹配</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><code class="notion-inline-code">Table.NestedJoin </code>(多键)</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>突破限制：</b> 实现 Excel 函数难以做到的“多条件同时匹配”和“反向查找”。</div></td></tr><tr class="notion-simple-table-row notion-block-2b76d25d51b580889fd8d7d150df5d45"><td class="" style="width:120px"><div class="notion-simple-table-cell"><b><a class="notion-link" href="/2946d25d51b5809c8d8eda56b566a655">EP008</a></b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>EP008</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>连接类型全解：六种连接模式</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><code class="notion-inline-code">JoinKind.LeftOuter</code>, <code class="notion-inline-code">JoinKind.Inner </code>等</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>数据库思维：</b> 深入图解 内连接、外连接、反连接（找不同）的应用场景。</div></td></tr></tbody></table><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-2b76d25d51b58030abd7dc49dc234c87" data-id="2b76d25d51b58030abd7dc49dc234c87"><span><div id="2b76d25d51b58030abd7dc49dc234c87" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2b76d25d51b58030abd7dc49dc234c87" title="第三章：数据汇总与批量处理 (追加查询)"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>第三章：数据汇总与批量处理 (追加查询)</b></span></span></h4><div class="notion-text notion-block-2b76d25d51b580ac85efe4b40f7cee1e"><em>解决“复制粘贴”的痛点，实现自动化汇总。</em></div><table class="notion-simple-table notion-block-2b76d25d51b580dba412f1fe7e765cab"><tbody><tr class="notion-simple-table-row notion-block-2b76d25d51b58002acecef05dec7f956"><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>笔记文档直达</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>对应视频</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>课程内容</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>幕后核心函数</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>核心知识点与原理</b></div></td></tr><tr class="notion-simple-table-row notion-block-2b76d25d51b580e49c7af42085d3b5f4"><td class="" style="width:120px"><div class="notion-simple-table-cell"><b><a class="notion-link" href="/29a6d25d51b5805ea156ec7ebba80149">EP009</a></b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">ㅤ</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>汇总神器001：讲透追加查询以及初识M函数（汇总同一工作簿下多个工作表）</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><code class="notion-inline-code">Excel.CurrentWorkbook</code><span style="padding:0.5em"></span><code class="notion-inline-code"> Table.Combine</code></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>动态汇总：</b> 利用<code class="notion-inline-code"> Excel.CurrentWorkbook() </code>抓取当前文件所有表，这是 PQ 最经典的技巧之一。</div></td></tr><tr class="notion-simple-table-row notion-block-2b76d25d51b580f88014e74308883f39"><td class="" style="width:120px"><div class="notion-simple-table-cell"><b><a class="notion-link" href="/29a6d25d51b5805ea156ec7ebba80149">EP010</a></b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">ㅤ</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>汇总神器002：讲透追加查询以及初识M函数（汇总不同工作簿）</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><code class="notion-inline-code">Excel.Workbook</code>, <code class="notion-inline-code">File.Contents</code></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>跨文件：</b> 如何从外部 Excel 文件抓取数据并合并。</div></td></tr><tr class="notion-simple-table-row notion-block-2b76d25d51b58068bbc9d2d1072f04ca"><td class="" style="width:120px"><div class="notion-simple-table-cell"><b><a class="notion-link" href="/29a6d25d51b5805ea156ec7ebba80149">EP011</a></b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">ㅤ</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>汇总神器003：讲透追加查询以及初识M函数（汇总同一文件夹下多个工作簿）</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><code class="notion-inline-code">Folder.Files</code><span style="padding:0.5em"></span><code class="notion-inline-code"> Table.Combine</code></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>批量处理：</b> 只要丢进文件夹就能自动汇总；理解二进制内容<code class="notion-inline-code"> (Binary) </code>的转换过程。</div></td></tr></tbody></table><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-2b76d25d51b580138583e6fdf1764c31" data-id="2b76d25d51b580138583e6fdf1764c31"><span><div id="2b76d25d51b580138583e6fdf1764c31" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2b76d25d51b580138583e6fdf1764c31" title="第四章：维度变换与辅助列 (高级清洗)"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>第四章：维度变换与辅助列 (高级清洗)</b></span></span></h4><div class="notion-text notion-block-2b76d25d51b5807a96e0d97b063a97e6"><em>从二维表到一维表的质变，以及灵活的数据修正。</em></div><table class="notion-simple-table notion-block-2b76d25d51b580ad89e7c84f2659342d"><tbody><tr class="notion-simple-table-row notion-block-2b76d25d51b58021ada3e4aab2d8e59b"><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>笔记文档直达</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>对应视频</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>课程内容</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>幕后核心函数</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>核心知识点与原理</b></div></td></tr><tr class="notion-simple-table-row notion-block-2b76d25d51b580e4b1d7d57c30ffd979"><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>EP012（暂无笔记文档）</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">ㅤ</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>维度魔术：逆透视与辅助列</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><code class="notion-inline-code">Table.Unpivot</code>, <code class="notion-inline-code">Table.Pivot</code><span style="padding:0.5em"></span><code class="notion-inline-code"> Table.AddIndexColumn</code></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>核心难点：</b>理解“逆透视”（列转行）是数据标准化的关键；索引列和条件列的创建技巧；特定值的替换(<code class="notion-inline-code">ReplaceValue</code>)。</div></td></tr></tbody></table><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-2b76d25d51b580238e42d7e6700e8e6c" data-id="2b76d25d51b580238e42d7e6700e8e6c"><span><div id="2b76d25d51b580238e42d7e6700e8e6c" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2b76d25d51b580238e42d7e6700e8e6c" title="第（2）阶段：M函数编程与底层逻辑实战"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>第（2）阶段：M函数编程与底层逻辑实战</b></span></span></h3><div class="notion-text notion-block-2b76d25d51b58079a874e06760479728">本阶段不再依赖UI点击，而是深入公式栏和高级编辑器，掌握 M 语言的“三大容器”与“核心算法”。</div><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-2b76d25d51b58085999ccb4293d893ad" data-id="2b76d25d51b58085999ccb4293d893ad"><span><div id="2b76d25d51b58085999ccb4293d893ad" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2b76d25d51b58085999ccb4293d893ad" title="第一章：M语言启蒙与三大容器"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>第一章：M语言启蒙与三大容器</b></span></span></h4><div class="notion-blank notion-block-2b76d25d51b58066a6e1dab1ff6d005e"> </div><table class="notion-simple-table notion-block-2b76d25d51b580fb89e3e8b8c5e8ed1d"><tbody><tr class="notion-simple-table-row notion-block-2b76d25d51b580e186f6f404f9c28006"><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>笔记文档直达</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>课程内容</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>核心函数 (Key Functions)</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>拓展知识与原理 (Knowledge)</b></div></td></tr><tr class="notion-simple-table-row notion-block-2b76d25d51b580fda988fb754ef8d877"><td class="" style="width:120px"><div class="notion-simple-table-cell"><a class="notion-link" href="/2b36d25d51b5802d8ac2d94cc128c0b3">EP013</a></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>初识M函数与三大容器</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">let...in, #table</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">理解 M 语言的结构；<b>List {}、Record []、Table</b> 的书写规范。</div></td></tr><tr class="notion-simple-table-row notion-block-2b76d25d51b580bf962deecd5d152bb9"><td class="" style="width:120px"><div class="notion-simple-table-cell"><b><a class="notion-link" href="/2b36d25d51b5802d8ac2d94cc128c0b3">EP014</a></b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>元素的精准钻取 (Drill Down)</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">Source{0}, Source[Name], Source{0}[Name], ?</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">学会如何从复杂结构中取值；掌握 <b>?</b> 容错符（避免报错返回null）。</div></td></tr><tr class="notion-simple-table-row notion-block-2b76d25d51b5806a97afff1db552e604"><td class="" style="width:120px"><div class="notion-simple-table-cell"><b><a class="notion-link" href="/2bc6d25d51b58072b43fdba187c27d34">EP015</a></b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>逻辑控制与容错保护</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">if...then...else, try...otherwise</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">M语言中的判断逻辑；如何让查询在遇到错误时自动使用备用值。</div></td></tr><tr class="notion-simple-table-row notion-block-2b76d25d51b5809aace7e73bfa1464eb"><td class="" style="width:120px"><div class="notion-simple-table-cell"><b><a class="notion-link" href="/2bc6d25d51b5801a9e1ac3d725e593af">EP016</a></b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>表格的基础运算与筛选</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">Table.SelectRows, Table.Distinct, Table.RowCount</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">表的行数计算；理解筛选行的代码本质；去重的逻辑。</div></td></tr><tr class="notion-simple-table-row notion-block-2b76d25d51b5809cba4dd1105de59744"><td class="" style="width:120px"><div class="notion-simple-table-cell"><b><a class="notion-link" href="/2bc6d25d51b5802db333feb12c72697b">EP017</a></b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>列表(List)的统计运算</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">List.Sum, List.Average, List.Max, List.Min, List.Count</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">理解将表的一列提取为 List 后进行聚合统计；忽略空值与不忽略的区别。</div></td></tr><tr class="notion-simple-table-row notion-block-2b76d25d51b5805e8a0be5758fead192"><td class="" style="width:120px"><div class="notion-simple-table-cell"><a class="notion-link" href="/2cc6d25d51b580ed8a49f6af2232cf52">EP018</a></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>理解上下文（each）和套娃嵌套，解决国际标准排名问题</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>each, _ (下划线)</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>全课重难点！</b> 理解 each 代表的遍历环境；理解内层环境与外层环境的变量传递。</div></td></tr><tr class="notion-simple-table-row notion-block-2b76d25d51b5802f842edcfc4fbf2d06"><td class="" style="width:120px"><div class="notion-simple-table-cell"><a class="notion-link" href="/2cc6d25d51b5805dbe88cb9a1db4cc0e">EP019</a></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>理解上下文（each）和套娃嵌套，区分国际标准排名和中国式排名问题</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><code class="notion-inline-code">Table.SelectRows </code>(嵌套),<code class="notion-inline-code"> Table.AddColumn</code></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">结合上下文知识，手写“中国式排名”公式；实现复杂的动态筛选。</div></td></tr><tr class="notion-simple-table-row notion-block-2cf6d25d51b58095b777eac6c7b9241e"><td class="" style="width:120px"><div class="notion-simple-table-cell"><a class="notion-link" href="/2cc6d25d51b580dd86b6d4167110c4de">EP020</a></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>知识点综合实战之动态交互查询</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">上下文嵌套、筛选、精准钻取值、动态参数</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">上下文嵌套、筛选、精准钻取值、动态参数</div></td></tr><tr class="notion-simple-table-row notion-block-2b76d25d51b5807ab35dd26359287aa2"><td class="" style="width:120px"><div class="notion-simple-table-cell">尚未更新</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>列表的遍历与转换</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">List.Transform</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>核心函数！</b> 批量处理列表中的每一个元素（例如将一列数字全部+1）。</div></td></tr><tr class="notion-simple-table-row notion-block-2b76d25d51b5805c91bae474a8197b8a"><td class="" style="width:120px"><div class="notion-simple-table-cell">尚未更新</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>列表的切片与跳过</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">List.Range, List.Select, List.Skip</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">如何截取列表的一部分（子集）；跳过前N个元素。</div></td></tr><tr class="notion-simple-table-row notion-block-2b76d25d51b580aa9510ca10051cfeeb"><td class="" style="width:120px"><div class="notion-simple-table-cell">尚未更新</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>列表的循环生成 (工资条案例)</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">List.Generate</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>进阶！</b> M语言中的 for/while 循环替代者；制作工资条的经典逻辑。</div></td></tr></tbody></table><hr class="notion-hr notion-block-2b76d25d51b5801c890efc89e3376d87"/><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-2b76d25d51b580beb99aec65c645ae7a" data-id="2b76d25d51b580beb99aec65c645ae7a"><span><div id="2b76d25d51b580beb99aec65c645ae7a" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2b76d25d51b580beb99aec65c645ae7a" title="第二章：核心函数族与数据重构"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>第二章：核心函数族与数据重构</b></span></span></h4><div class="notion-blank notion-block-2b76d25d51b5807a945dc3f9cfd991af"> </div><table class="notion-simple-table notion-block-2b76d25d51b580beb356dd8890bbe3af"><tbody><tr class="notion-simple-table-row notion-block-2b76d25d51b580afbc94f8648481977a"><td class="" style="width:120px"><div class="notion-simple-table-cell">笔记文档直达</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>课程标题</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>核心函数 (Key Functions)</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>拓展知识与原理 (Knowledge)</b></div></td></tr><tr class="notion-simple-table-row notion-block-2b76d25d51b5809cbf65c37fc557e2a3"><td class="" style="width:120px"><div class="notion-simple-table-cell">尚未更新</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>列表的去重、排序与判空</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">List.Distinct, List.RemoveNulls, List.Sort, List.IsEmpty</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">列表清洗三板斧；如何对嵌套列表进行排序。</div></td></tr><tr class="notion-simple-table-row notion-block-2b76d25d51b5807a8774d38408423ba6"><td class="" style="width:120px"><div class="notion-simple-table-cell">尚未更新</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>表格排序与定位查找</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">Table.Sort, List.PositionOf</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">多列排序的代码写法；查找某个值在列表中的下标位置（索引）。</div></td></tr><tr class="notion-simple-table-row notion-block-2b76d25d51b5801d8d68fbf628ce4afe"><td class="" style="width:120px"><div class="notion-simple-table-cell">尚未更新</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>记录 (Record) 转列表与列名获取</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">Record.ToList, Table.ColumnNames</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">将“行”转为“列”；动态获取表的所有标题名（为后续动态合并做准备）。</div></td></tr><tr class="notion-simple-table-row notion-block-2b76d25d51b5800ba932c50dd43aba6c"><td class="" style="width:120px"><div class="notion-simple-table-cell">尚未更新</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>多列压缩与表格重构 (Zip)</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">List.Zip, Table.ToColumns, Table.FromColumns</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>重构神器！</b> 将多列数据“拉链”式合并；实现多列转两列的高级技巧。</div></td></tr><tr class="notion-simple-table-row notion-block-2b76d25d51b580ac9d55cbb549820639"><td class="" style="width:120px"><div class="notion-simple-table-cell">尚未更新</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>笛卡尔积与全组合</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">List.TransformMany</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">生成两个列表的所有组合（如：颜色x尺寸）；理解 M 语言中的双重遍历。</div></td></tr><tr class="notion-simple-table-row notion-block-2b76d25d51b58015be45d81cf5192854"><td class="" style="width:120px"><div class="notion-simple-table-cell">尚未更新</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>数值计算与舍入</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">Number.RoundDown, Number.From</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">向下取整在生成重复序列（1,1,1,2,2,2）中的应用。</div></td></tr><tr class="notion-simple-table-row notion-block-2b76d25d51b5802eb9bbcb59de216d7a"><td class="" style="width:120px"><div class="notion-simple-table-cell">尚未更新</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>高级分组聚合 (Table.Group)</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">Table.Group</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">深入理解分组的第四、第五参数（局部模式 vs 全局模式）；自定义分组逻辑。</div></td></tr><tr class="notion-simple-table-row notion-block-2b76d25d51b58091977ed3143986617e"><td class="" style="width:120px"><div class="notion-simple-table-cell">尚未更新</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>取特定行 (整行记录)</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">Table.Max, Table.Min</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">不止是取最大值，而是取最大值所在的<b>整行记录</b>。</div></td></tr><tr class="notion-simple-table-row notion-block-2b76d25d51b580f481edd532ea5bd237"><td class="" style="width:120px"><div class="notion-simple-table-cell">尚未更新</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>文本处理全家桶 (上)</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">Text.Start/End/Middle, Text.Combine, Text.Split</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">文本的提取、合并与拆分；Text.Combine 在合并同类项中的应用。</div></td></tr><tr class="notion-simple-table-row notion-block-2b76d25d51b580aebbbbfba67710aaa0"><td class="" style="width:120px"><div class="notion-simple-table-cell">尚未更新</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>日期转换与文本判断</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">Date.FromText, Date.ToText, Text.Contains</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">文本转日期的格式代码（yyyy-MM-dd）；模糊匹配与区分大小写。</div></td></tr><tr class="notion-simple-table-row notion-block-2b76d25d51b580868f96f619127f6dc2"><td class="" style="width:120px"><div class="notion-simple-table-cell">尚未更新</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>S01阶段 综合实战案例</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">Table.AddColumn 综合运用</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>实战：</b> 判断是否断货、多列转两列完整流程、提取特定位置的值。</div></td></tr></tbody></table><hr class="notion-hr notion-block-2b76d25d51b58072a1c5fd53c966507d"/><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-2b76d25d51b5800eb88ef0642d1eb699" data-id="2b76d25d51b5800eb88ef0642d1eb699"><span><div id="2b76d25d51b5800eb88ef0642d1eb699" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2b76d25d51b5800eb88ef0642d1eb699" title="第三章：高级算法与逻辑深造"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>第三章：高级算法与逻辑深造</b></span></span></h4><div class="notion-blank notion-block-2b76d25d51b580b5993cc914952a13aa"> </div><table class="notion-simple-table notion-block-2b76d25d51b580b6b3d5f9191791ae7c"><tbody><tr class="notion-simple-table-row notion-block-2b76d25d51b580f7a405cf8859406e11"><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>模块序号</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>课程标题</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>核心函数 (Key Functions)</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>拓展知识与原理 (Knowledge)</b></div></td></tr><tr class="notion-simple-table-row notion-block-2b76d25d51b580f39127e3055f5f403b"><td class="" style="width:120px"><div class="notion-simple-table-cell">尚未更新</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>迭代神技：List.Accumulate</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">List.Accumulate</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>S02镇山之宝！</b> 理解累加器、种子值、状态传递；解决递归计算问题。</div></td></tr><tr class="notion-simple-table-row notion-block-2b76d25d51b580ecb33fe4a7ef980910"><td class="" style="width:120px"><div class="notion-simple-table-cell">尚未更新</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>文本深度清洗与处理 (下)</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">Text.Remove, Text.SplitAny, Text.PadStart</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">移除指定字符；按多种分隔符拆分；文本补齐（如 1 补成 001）。</div></td></tr><tr class="notion-simple-table-row notion-block-2b76d25d51b5803382a2f22066ef72cf"><td class="" style="width:120px"><div class="notion-simple-table-cell">尚未更新</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>查找位置的高级应用</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">Text.PositionOf (返回所有位置)</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">查找字符出现的所有位置；处理重复字符。</div></td></tr><tr class="notion-simple-table-row notion-block-2b76d25d51b58015a37dc88554eb2389"><td class="" style="width:120px"><div class="notion-simple-table-cell">尚未更新</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>实战：缺勤名单与批量换行</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">Table.SelectRows, Text.Replace</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>实战：</b> 解决复杂的考勤对比逻辑；清理单元格内的换行符。</div></td></tr><tr class="notion-simple-table-row notion-block-2b76d25d51b58017ae3df5531beef0af"><td class="" style="width:120px"><div class="notion-simple-table-cell">尚未更新</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>动态代码执行 (宏表函数)</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">Expression.Evaluate</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>黑科技：</b> 将文本字符串作为 M 代码执行；#shared 环境参数的重要性。</div></td></tr><tr class="notion-simple-table-row notion-block-2b76d25d51b5803b9789d397fd4c1d37"><td class="" style="width:120px"><div class="notion-simple-table-cell">尚未更新</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>生成器与拆分器对象</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">Combiner.*, Splitter.*</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">深入理解合并与拆分的底层函数对象（Function Objects）。</div></td></tr><tr class="notion-simple-table-row notion-block-2b76d25d51b5805eac70c065911f06b1"><td class="" style="width:120px"><div class="notion-simple-table-cell">尚未更新</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>列表 (List) 深度查漏补缺</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">List.Intersect, List.Reverse, List.First/Last</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">列表的集合运算（交集、差集）；列表反转与取首尾值。</div></td></tr><tr class="notion-simple-table-row notion-block-2b76d25d51b5806abf70f2a2eb45b3f7"><td class="" style="width:120px"><div class="notion-simple-table-cell">尚未更新</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>记录 (Record) 的增删改查</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">Record.Field, Record.AddField, Record.RemoveFields</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">像操作数据库一样操作 Record；动态字段名处理。</div></td></tr><tr class="notion-simple-table-row notion-block-2b76d25d51b580018741d01da9feafb5"><td class="" style="width:120px"><div class="notion-simple-table-cell">尚未更新</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>记录的高级转换</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">Record.TransformFields</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">批量转换 Record 中的值；Record 与 Table/List 的转换闭环。</div></td></tr></tbody></table><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-2b76d25d51b580d89ddae499d659e897" data-id="2b76d25d51b580d89ddae499d659e897"><span><div id="2b76d25d51b580d89ddae499d659e897" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2b76d25d51b580d89ddae499d659e897" title="第四章：文件系统与全类型精通"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>第四章：文件系统与全类型精通</b></span></span></h4><div class="notion-blank notion-block-2b76d25d51b580c1be60fbcdc7a943dc"> </div><table class="notion-simple-table notion-block-2b76d25d51b5804f967bcf17a159dc6e"><tbody><tr class="notion-simple-table-row notion-block-2b76d25d51b5802ba311e0a8b98e255b"><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>模块序号</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>课程标题</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>核心函数 (Key Functions)</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>拓展知识与原理 (Knowledge)</b></div></td></tr><tr class="notion-simple-table-row notion-block-2b76d25d51b5800ba715f33efc304e2f"><td class="" style="width:120px"><div class="notion-simple-table-cell">尚未更新</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>表格 (Table) 的终极控制</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">Table.AddRankColumn, Table.Transpose, Table.Fill</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">表格转置的坑与填；填充（FillDown/Up）的妙用；表操作查漏补缺。</div></td></tr><tr class="notion-simple-table-row notion-block-2b76d25d51b5805ca0d0ef95d15cef6d"><td class="" style="width:120px"><div class="notion-simple-table-cell">尚未更新</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>透视与逆透视的底层逻辑</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">Table.Pivot, Table.Unpivot</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>重点：</b> 深入理解“不要聚合”的透视；处理多层表头的逆透视。</div></td></tr><tr class="notion-simple-table-row notion-block-2b76d25d51b58058b59cd8f385054f12"><td class="" style="width:120px"><div class="notion-simple-table-cell">尚未更新</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>嵌套表的处理 (聚合列)</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">Table.AggregateTableColumn</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>重点：</b> 处理 Group 或 Join 产生的嵌套表；不展开行直接聚合计算。</div></td></tr><tr class="notion-simple-table-row notion-block-2b76d25d51b5804d98a2e7a37b8b8e8b"><td class="" style="width:120px"><div class="notion-simple-table-cell">尚未更新</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>文件系统：自动识别与导入</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">Folder.Files, Excel.Workbook, Csv.Document</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">自动识别文件路径；处理 CSV 与 Excel 文件的参数细节。</div></td></tr><tr class="notion-simple-table-row notion-block-2b76d25d51b580679e33d4e176a6c6ff"><td class="" style="width:120px"><div class="notion-simple-table-cell">尚未更新</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>终极实战：多表合并痛点解决</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">Table.Combine (高级用法)</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>实战：</b> 解决“不同数量字段”的多表合并；从文件夹批量读取并对齐列。</div></td></tr><tr class="notion-simple-table-row notion-block-2b76d25d51b580c0b356d2b93f1b0674"><td class="" style="width:120px"><div class="notion-simple-table-cell">尚未更新</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>时间与日期全家桶</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">DateTime.*, Date.*, Time.*</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">时间、日期、日期时间三者的转换与计算；计算两个时间点的差值 (Duration)。</div></td></tr><tr class="notion-simple-table-row notion-block-2b76d25d51b580d1b543c1dc6c4d940e"><td class="" style="width:120px"><div class="notion-simple-table-cell">尚未更新</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>Duration (时长) 的计算</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">Duration.Days, Duration.TotalHours</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">计算工时、天数差；将时长转换为文本格式。</div></td></tr><tr class="notion-simple-table-row notion-block-2b76d25d51b5800e8682f4aad3bdb8f1"><td class="" style="width:120px"><div class="notion-simple-table-cell">尚未更新</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>终极武器：正则表达式 (Regex)</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">Web.Page (JS Injection)</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>压轴大戏：</b> 在 Power Query 中调用 JavaScript 实现正则表达式，处理非结构化脏数据。</div></td></tr></tbody></table><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-2b76d25d51b5803b808bc577f4e7d9e7" data-id="2b76d25d51b5803b808bc577f4e7d9e7"><span><div id="2b76d25d51b5803b808bc577f4e7d9e7" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2b76d25d51b5803b808bc577f4e7d9e7" title="第（3）阶段：数据建模与DAX核心"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>第（3）阶段：数据建模与DAX核心</b></span></span></h3><div class="notion-text notion-block-2b76d25d51b580699830ffa1ef60a8e7">这一阶段的难度通常被认为是 Power BI 学习曲线中<b>最陡峭</b>的部分（尤其是理解上下文），所以课程设计会非常注重逻辑性。</div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-2cf6d25d51b580e1bf06e09bc6ebbe9e"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3A8e4a13a0-8058-41c0-9196-7810e328a495%3Aimage.png?table=block&amp;id=2cf6d25d-51b5-80e1-bf06-e09bc6ebbe9e&amp;t=2cf6d25d-51b5-80e1-bf06-e09bc6ebbe9e" alt="notion image" loading="lazy" decoding="async"/></div></figure><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-2b76d25d51b5801b9827d53b94485371" data-id="2b76d25d51b5801b9827d53b94485371"><span><div id="2b76d25d51b5801b9827d53b94485371" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2b76d25d51b5801b9827d53b94485371" title="模块一：建模思维与星型模式"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>模块一：建模思维与星型模式</b></span></span></h4><div class="notion-text notion-block-2b76d25d51b5806486c6e16b93d92106"><em>告别 Excel 的“大宽表”思维，拥抱数据库思维。</em></div><ol start="1" class="notion-list notion-list-numbered notion-block-2b76d25d51b5806ca9aac86075c832b6" style="list-style-type:decimal"><li><b>关系 (Relationships) 的本质</b>：什么是“一对多”？什么是“多对多”（为什么尽量别用）？什么是“双向筛选”（为什么是性能杀手）？</li></ol><ol start="2" class="notion-list notion-list-numbered notion-block-2b76d25d51b5805385bdf7f21262638c" style="list-style-type:decimal"><li><b>星型模式</b>：这是<code class="notion-inline-code"> Power BI </code>的黄金法则。</li><ol class="notion-list notion-list-numbered notion-block-2b76d25d51b5805385bdf7f21262638c" style="list-style-type:lower-alpha"><ul class="notion-list notion-list-disc notion-block-2b76d25d51b5804397abfd0a482dbe4a"><li><b>事实表 (Fact Table)</b>：存数据的（销量、金额）。</li></ul><ul class="notion-list notion-list-disc notion-block-2b76d25d51b58063917eff40e523209f"><li><b>维度表 (Dimension Table)</b>：存属性的（产品、地区、日期）。</li></ul><ul class="notion-list notion-list-disc notion-block-2b76d25d51b580dfb4e6ffbe91b679e9"><li><b>实战</b>：如何把 PQ 洗出来的大宽表拆解成星型模型。</li></ul></ol></ol><ol start="3" class="notion-list notion-list-numbered notion-block-2b76d25d51b580dc9de9c8f0afc4f9ea" style="list-style-type:decimal"><li><b>日历表(Calendar Table)</b>：为什么必须要有独立的日期表？如何在 DAX 中使用它。</li></ol><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-2b76d25d51b580f18b56dc2d1ac2b957" data-id="2b76d25d51b580f18b56dc2d1ac2b957"><span><div id="2b76d25d51b580f18b56dc2d1ac2b957" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2b76d25d51b580f18b56dc2d1ac2b957" title="模块二：DAX 语言基础"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>模块二：DAX 语言基础</b></span></span></h4><div class="notion-text notion-block-2b76d25d51b580049494fa34ad80a36b"><em>M 语言是给机器看的步骤，DAX 是给老板、给业务看的逻辑。</em></div><ol start="1" class="notion-list notion-list-numbered notion-block-2b76d25d51b5800099a6fef290e3c137" style="list-style-type:decimal"><li><b>计算列 (Calculated Columns) vs 度量值(Measures)</b>：</li><ol class="notion-list notion-list-numbered notion-block-2b76d25d51b5800099a6fef290e3c137" style="list-style-type:lower-alpha"><ul class="notion-list notion-list-disc notion-block-2b76d25d51b5807d9ba7fb0704db184d"><li><b>死穴</b>：新手最爱用计算列，熟手只用度量值。为什么？（静态存储 vs 动态计算）。</li></ul></ol></ol><ol start="2" class="notion-list notion-list-numbered notion-block-2b76d25d51b580f88427d11c41aebc66" style="list-style-type:decimal"><li><b>基础聚合函数</b>：<code class="notion-inline-code">SUM</code><span style="padding:0.5em"></span><code class="notion-inline-code"> AVERAGE</code><span style="padding:0.5em"></span><code class="notion-inline-code"> COUNTROWS</code><span style="padding:0.5em"></span><code class="notion-inline-code"> DISTINCTCOUNT</code>。</li></ol><ol start="3" class="notion-list notion-list-numbered notion-block-2b76d25d51b580d391c2e87c3e896f80" style="list-style-type:decimal"><li><b>逻辑函数</b>：IF, SWITCH (比 Excel 的 IF 好用太多), DIVIDE (安全除法)。</li></ol><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-2cf6d25d51b580b6964fc2bfa4835853"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3A813268ee-0848-4565-b6dc-737a11567251%3Aimage.png?table=block&amp;id=2cf6d25d-51b5-80b6-964f-c2bfa4835853&amp;t=2cf6d25d-51b5-80b6-964f-c2bfa4835853" alt="notion image" loading="lazy" decoding="async"/></div></figure><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-2b76d25d51b5802f93d6eb7dfdff82f9" data-id="2b76d25d51b5802f93d6eb7dfdff82f9"><span><div id="2b76d25d51b5802f93d6eb7dfdff82f9" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2b76d25d51b5802f93d6eb7dfdff82f9" title="模块三：DAX的灵魂——上下文(Context)"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>模块三：DAX的灵魂——上下文(Context)</b></span></span></h4><div class="notion-text notion-block-2b76d25d51b5809886b3dfdff9dc79a2"><em>不理解上下文，就永远学不会 DAX。</em></div><ol start="1" class="notion-list notion-list-numbered notion-block-2b76d25d51b580949940ca8528f00766" style="list-style-type:decimal"><li><b>筛选上下文</b><code class="notion-inline-code"><b> (Filter Context)</b></code>：为什么把“产品”拖到切片器里，销售额就会自动变？</li></ol><ol start="2" class="notion-list notion-list-numbered notion-block-2b76d25d51b580fa9982cde8e1809620" style="list-style-type:decimal"><li><b>行上下文</b><code class="notion-inline-code"><b> (Row Context)</b></code>：类似 M 语言的 each，但在 DAX 里它是怎么工作的？</li></ol><ol start="3" class="notion-list notion-list-numbered notion-block-2b76d25d51b5807b887af6824d584b7b" style="list-style-type:decimal"><li><b>上下文转换</b><code class="notion-inline-code"><b> (Context Transition)</b></code>：当<code class="notion-inline-code"> CALCULATE </code>遇见度量值时发生了什么？</li></ol><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-2b76d25d51b580848b9cddeff4b4f3b9" data-id="2b76d25d51b580848b9cddeff4b4f3b9"><span><div id="2b76d25d51b580848b9cddeff4b4f3b9" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2b76d25d51b580848b9cddeff4b4f3b9" title="模块四：DAX进阶函数 (Advanced DAX)"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>模块四：DAX进阶函数 (Advanced DAX)</b></span></span></h4><ol start="1" class="notion-list notion-list-numbered notion-block-2b76d25d51b580649174e497bb48ea6d" style="list-style-type:decimal"><li><b>CALCULATE</b>：<b>DAX 之神</b>。如何修改、覆盖、移除筛选上下文。</li></ol><ol start="2" class="notion-list notion-list-numbered notion-block-2b76d25d51b58091b6b2c3fc61c56baf" style="list-style-type:decimal"><li><b>筛选器函数</b>：FILTER, ALL, ALLEXCEPT, VALUES, KEEPFILTERS。</li></ol><ol start="3" class="notion-list notion-list-numbered notion-block-2b76d25d51b58070bac1e1e0a72b5b50" style="list-style-type:decimal"><li><b>时间智能 (Time Intelligence)</b>：一行代码算出：</li><ol class="notion-list notion-list-numbered notion-block-2b76d25d51b58070bac1e1e0a72b5b50" style="list-style-type:lower-alpha"><ul class="notion-list notion-list-disc notion-block-2b76d25d51b580168c46da940f49f013"><li>TOTALYTD (年初至今)</li></ul><ul class="notion-list notion-list-disc notion-block-2b76d25d51b58000b841e9f9a983fa2f"><li>SAMEPERIODLASTYEAR (去年同期)</li></ul><ul class="notion-list notion-list-disc notion-block-2b76d25d51b58003b9d3fde2e95332c4"><li>DATEADD (环比/同比)</li></ul></ol></ol><ol start="4" class="notion-list notion-list-numbered notion-block-2b76d25d51b58023a9fed5d78c02dae2" style="list-style-type:decimal"><li><b>排名与迭代</b>：RANKX, SUMX (迭代函数系列)。</li></ol><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-2b76d25d51b580d7bdafd3fd1b85e688" data-id="2b76d25d51b580d7bdafd3fd1b85e688"><span><div id="2b76d25d51b580d7bdafd3fd1b85e688" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2b76d25d51b580d7bdafd3fd1b85e688" title="第（4）阶段：Excel可视化图表与仪表板实战"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>第（4）阶段：Excel可视化图表与仪表板实战</b></span></span></h3><div class="notion-text notion-block-2b76d25d51b580fd9affe187f3c66af6"><b>工具：Excel 2021</b></div><div class="notion-text notion-block-2b76d25d51b58099853df4def40f2bb4"><b>目标</b>：不用Power BI，也能在 Excel 里做出会联动的、专业的管理驾驶舱。</div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-2cf6d25d51b580099c7bce7d5b6b0b56"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3A251bb14f-6aac-44d8-ad95-2266c98ce9ca%3Aimage.png?table=block&amp;id=2cf6d25d-51b5-8009-9c7b-ce7d5b6b0b56&amp;t=2cf6d25d-51b5-8009-9c7b-ce7d5b6b0b56" alt="notion image" loading="lazy" decoding="async"/></div></figure><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-2b76d25d51b5803abe1df393280f3245" data-id="2b76d25d51b5803abe1df393280f3245"><span><div id="2b76d25d51b5803abe1df393280f3245" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2b76d25d51b5803abe1df393280f3245" title="模块一：不仅仅是图表"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>模块一：不仅仅是图表</b></span></span></h4><ol start="1" class="notion-list notion-list-numbered notion-block-2b76d25d51b58010bd5efd1d7080d9fb" style="list-style-type:decimal"><li><b>透视表的进阶美化</b>：</li><ol class="notion-list notion-list-numbered notion-block-2b76d25d51b58010bd5efd1d7080d9fb" style="list-style-type:lower-alpha"><ul class="notion-list notion-list-disc notion-block-2b76d25d51b58040a22eeb83e6f146d0"><li>去掉“求和项：”，使用表格布局，自定义数字格式（如 #,##0,,&quot;M&quot; 显示百万单位）。</li></ul><ul class="notion-list notion-list-disc notion-block-2b76d25d51b580f6867de41be1c63202"><li>使用 <b>条件格式</b> (数据条、图标集) 制作“微图表”。</li></ul></ol></ol><ol start="2" class="notion-list notion-list-numbered notion-block-2b76d25d51b580eca506d3070ecb14bb" style="list-style-type:decimal"><li><b>切片器 (Slicer) 与 日程表 (Timeline) 的设计</b>：</li><ol class="notion-list notion-list-numbered notion-block-2b76d25d51b580eca506d3070ecb14bb" style="list-style-type:lower-alpha"><ul class="notion-list notion-list-disc notion-block-2b76d25d51b58032a2eae635746e1e38"><li>如何把切片器做成“导航栏”样式（多列布局）。</li></ul><ul class="notion-list notion-list-disc notion-block-2b76d25d51b580cb9f06d34f8bbe142b"><li><b>切片器关联</b>：一个切片器同时控制 5 张透视表和图表（报表联动的核心）。</li></ul></ol></ol><ol start="3" class="notion-list notion-list-numbered notion-block-2b76d25d51b580c49e9bfad7d4997999" style="list-style-type:decimal"><li><b>Excel 2021 特有/新图表</b>：</li><ol class="notion-list notion-list-numbered notion-block-2b76d25d51b580c49e9bfad7d4997999" style="list-style-type:lower-alpha"><ul class="notion-list notion-list-disc notion-block-2b76d25d51b58020a145d1cd15c7e294"><li><b>瀑布图</b>：分析资金变动。</li></ul><ul class="notion-list notion-list-disc notion-block-2b76d25d51b5802a91cfc358bcab28a1"><li><b>漏斗图</b>：分析销售转化。</li></ul><ul class="notion-list notion-list-disc notion-block-2b76d25d51b58061916ef67d304dcf9c"><li><b>地图</b>：地理数据展示。</li></ul></ol></ol><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-2cf6d25d51b5801194dbdc6497db4b8f"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3Af1a0525b-e6c9-4e9f-b496-92831959c679%3Aimage.png?table=block&amp;id=2cf6d25d-51b5-8011-94db-dc6497db4b8f&amp;t=2cf6d25d-51b5-8011-94db-dc6497db4b8f" alt="notion image" loading="lazy" decoding="async"/></div></figure><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-2b76d25d51b580088d5eccb38964c000" data-id="2b76d25d51b580088d5eccb38964c000"><span><div id="2b76d25d51b580088d5eccb38964c000" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2b76d25d51b580088d5eccb38964c000" title="模块二：动态交互仪表板"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>模块二：动态交互仪表板</b></span></span></h4><ol start="1" class="notion-list notion-list-numbered notion-block-2b76d25d51b5808d9d9acc742376b59d" style="list-style-type:decimal"><li><b>CUBE 函数黑科技 (可选高阶)</b>：</li><ol class="notion-list notion-list-numbered notion-block-2b76d25d51b5808d9d9acc742376b59d" style="list-style-type:lower-alpha"><ul class="notion-list notion-list-disc notion-block-2b76d25d51b580948c00fb079db2c917"><li>使用 CUBEMEMBER 和 CUBEVALUE 从数据模型直接取数到单元格。</li></ul><ul class="notion-list notion-list-disc notion-block-2b76d25d51b5805a9b66ee2425db7d29"><li><em>价值</em>：突破透视表的布局限制，在任意单元格设计自由布局的“卡片图”。</li></ul></ol></ol><ol start="2" class="notion-list notion-list-numbered notion-block-2b76d25d51b58019b3a0f020eb1d654d" style="list-style-type:decimal"><li><b>动态标题与配色</b>：</li><ol class="notion-list notion-list-numbered notion-block-2b76d25d51b58019b3a0f020eb1d654d" style="list-style-type:lower-alpha"><ul class="notion-list notion-list-disc notion-block-2b76d25d51b580d7b2abdca82c53febc"><li>让图表标题随切片器选择而变化（如“2023年 华东区 销售分析”）。</li></ul><ul class="notion-list notion-list-disc notion-block-2b76d25d51b58024a545eaa9cc56d70c"><li>商务配色方案（深色模式、品牌色设定）。</li></ul></ol></ol><ol start="3" class="notion-list notion-list-numbered notion-block-2b76d25d51b5806d984ae24678029ab8" style="list-style-type:decimal"><li><b>仪表板布局原则</b>：</li><ol class="notion-list notion-list-numbered notion-block-2b76d25d51b5806d984ae24678029ab8" style="list-style-type:lower-alpha"><ul class="notion-list notion-list-disc notion-block-2b76d25d51b5803da45ee7b2ea8f810e"><li>排版逻辑：KPI 关键指标在顶，趋势在中，明细在底。</li></ul><ul class="notion-list notion-list-disc notion-block-2b76d25d51b58079af1fe5a15a4c6f7b"><li>隐藏网格线、标题栏，让 Excel 看起来像一个 App。</li></ul></ol></ol><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-2cf6d25d51b58097a600dd9343daaa0e"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3A90a2cd26-04d1-4139-8a76-d57a3ad7e2bb%3Aimage.png?table=block&amp;id=2cf6d25d-51b5-8097-a600-dd9343daaa0e&amp;t=2cf6d25d-51b5-8097-a600-dd9343daaa0e" alt="notion image" loading="lazy" decoding="async"/></div></figure><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-2b76d25d51b58002897fe07cdbe27db5" data-id="2b76d25d51b58002897fe07cdbe27db5"><span><div id="2b76d25d51b58002897fe07cdbe27db5" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2b76d25d51b58002897fe07cdbe27db5" title="结尾篇：从Excel无缝转移到PowerBI "><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>结尾篇：从Excel无缝转移到PowerBI </b></span></span></h3><div class="notion-text notion-block-2b76d25d51b580c8a8acd04227e76899"><b>目标</b>：总结全课，通过对比演示，让学员感受到Excel的极限，无缝转移到 Power BI。</div><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-2b76d25d51b580e591e8cd5240f8ebac" data-id="2b76d25d51b580e591e8cd5240f8ebac"><span><div id="2b76d25d51b580e591e8cd5240f8ebac" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2b76d25d51b580e591e8cd5240f8ebac" title="第一章：回顾与总结——现代 Excel 的全貌"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>第一章：回顾与总结——现代 Excel 的全貌</b></span></span></h4><ul class="notion-list notion-list-disc notion-block-2b76d25d51b580aea888de0ffd92aaad"><li><b>内容</b>：</li><ul class="notion-list notion-list-disc notion-block-2b76d25d51b580aea888de0ffd92aaad"><li>复盘一张图：<code class="notion-inline-code"><b>Source (PQ) -&gt; Model (PP/DAX) -&gt; Report (Chart)</b></code>。</li><li>恭喜大家，你们其实已经学会了Power BI的<b>80%核心技能</b>！</li><li><em>揭秘</em>：Excel 里的<code class="notion-inline-code"> Power Query </code>和<code class="notion-inline-code"> Power Pivot</code>，就是<code class="notion-inline-code"> Power BI </code>的心脏和大脑。</li></ul></ul><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-2b76d25d51b580229907c989868c602c" data-id="2b76d25d51b580229907c989868c602c"><span><div id="2b76d25d51b580229907c989868c602c" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2b76d25d51b580229907c989868c602c" title="第二章：Excel 的极限与痛点 (为什么要无缝转移到 Power BI？)"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>第二章：Excel 的极限与痛点 (为什么要无缝转移到 Power BI？)</b></span></span></h4><ul class="notion-list notion-list-disc notion-block-2b76d25d51b5806bbe73c70822b5f9d5"><li><b>痛点1：数据量的瓶颈</b></li><ul class="notion-list notion-list-disc notion-block-2b76d25d51b5806bbe73c70822b5f9d5"><li><em>演示</em>：虽然模型能存 1000 万行，但如果你想在 Excel 界面上画出 100 万个点的散点图，Excel 会卡死。Power BI 是为大数据渲染而生的。</li></ul></ul><ul class="notion-list notion-list-disc notion-block-2b76d25d51b5807696bbd617eadb39d8"><li><b>痛点2：交互的局限</b></li><ul class="notion-list notion-list-disc notion-block-2b76d25d51b5807696bbd617eadb39d8"><li><em>对比</em>：Excel 的切片器只能筛选；Power BI 的图表之间可以**“钻取”、“联动”、“悬停提示 (Tooltip)”。</li></ul></ul><ul class="notion-list notion-list-disc notion-block-2b76d25d51b58073912ccf4b67e69dfc"><li><b>痛点3：分享的困难</b></li><ul class="notion-list notion-list-disc notion-block-2b76d25d51b58073912ccf4b67e69dfc"><li><em>场景</em>：Excel 只能发文件，发出去数据就不可控了（容易被改、版本混乱）。</li><li><em>Power BI 优势</em>：发布到 Web/手机端，生成链接，数据自动刷新，权限控制（张三只能看北京的数据）。</li></ul></ul><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-2b76d25d51b5803a9e8df38df18f2d50" data-id="2b76d25d51b5803a9e8df38df18f2d50"><span><div id="2b76d25d51b5803a9e8df38df18f2d50" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2b76d25d51b5803a9e8df38df18f2d50" title="第三章：无缝迁移——见证奇迹的时刻"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>第三章：无缝迁移——见证奇迹的时刻</b></span></span></h4><ul class="notion-list notion-list-disc notion-block-2b76d25d51b58093b20ff3b0b067627a"><li><b>核心演示</b>：</li><ul class="notion-list notion-list-disc notion-block-2b76d25d51b58093b20ff3b0b067627a"><ol start="1" class="notion-list notion-list-numbered notion-block-2b76d25d51b580b3b32dc8ada4b39b04" style="list-style-type:decimal"><li>打开<code class="notion-inline-code"> Power BI Desktop </code>。</li></ol><ol start="2" class="notion-list notion-list-numbered notion-block-2b76d25d51b580ffac11f88fc8ace695" style="list-style-type:decimal"><li>点击 <b>“文件” -&gt; “导入” -&gt; “</b><code class="notion-inline-code"><b>Power Query, Power Pivot, Power View</b></code><b>”</b>。</li></ol><ol start="3" class="notion-list notion-list-numbered notion-block-2b76d25d51b5803cb247ecb3e709df28" style="list-style-type:decimal"><li>选择我们在<code class="notion-inline-code"> Excel BI </code>课程里做好的那个<code class="notion-inline-code">.xlsx</code>最终大作业。</li></ol><ol start="4" class="notion-list notion-list-numbered notion-block-2b76d25d51b58015ad36d146c5c5ee12" style="list-style-type:decimal"><li><b>见证</b>：所有的 PQ 清洗步骤、所有的表关系、所有的<code class="notion-inline-code"> DAX </code>度量值，<b>瞬间全部自动迁移到了</b><code class="notion-inline-code"><b> Power BI </b></code><b>里！</b></li></ol><ol start="5" class="notion-list notion-list-numbered notion-block-2b76d25d51b5805db64bf096d6588e2d" style="list-style-type:decimal"><li><b>结论</b>：你在<code class="notion-inline-code"> Excel </code>课里学的每一行代码，都没有浪费！</li></ol></ul></ul><ul class="notion-list notion-list-disc notion-block-2b76d25d51b580139676d4db1aa63e04"><li>我们将解锁：</li><ul class="notion-list notion-list-disc notion-block-2b76d25d51b580139676d4db1aa63e04"><li><b>更酷炫的可视化</b>：地图钻取、AI 分析图表、自定义视觉对象。</li><li><b>更强大的 DAX</b>：时间智能、复杂聚合。</li><li><b>企业级发布</b>：云端协作、手机报表、自动刷新。</li></ul></ul><div class="notion-text notion-block-2b76d25d51b580b89313d92f8fd53a62"><em>Slogan</em>：<b>“带着 Excel 的内功，换上Power BI的战袍，征服数据分析的星辰大海。”</b></div><div class="notion-blank notion-block-2b66d25d51b58139bf00d49bc2e34bbe"> </div><hr class="notion-hr notion-block-2b66d25d51b5813c8322ea83d6eed45c"/><div class="notion-row notion-block-2b66d25d51b58190889ee7c7ca49f68b"><div class="notion-column notion-block-2b66d25d51b581e3a6e0dd3e556684fa" style="width:calc((100% - (1 * min(32px, 4vw))) * 0.5)"><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-2b66d25d51b581559023e82da97c6d04"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3A051528e2-bd6a-4484-9116-875355c9ef00%3A%E5%BE%AE%E4%BF%A1%E5%9B%BE%E7%89%87_20251120165137_183_147.jpg?table=block&amp;id=2b66d25d-51b5-8155-9023-e82da97c6d04&amp;t=2b66d25d-51b5-8155-9023-e82da97c6d04" alt="notion image" loading="lazy" decoding="async"/></div></figure></div><div class="notion-spacer"></div><div class="notion-column notion-block-2b66d25d51b581238c84c14c4b0cdeec" style="width:calc((100% - (1 * min(32px, 4vw))) * 0.5)"><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-2b66d25d51b581d086ddc5567e05c5cc"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3Af5bedd0e-71d0-4bcf-844e-f87c0a90b4e5%3A%E6%B5%B7%E6%8A%A5_(2).png?table=block&amp;id=2b66d25d-51b5-81d0-86dd-c5567e05c5cc&amp;t=2b66d25d-51b5-81d0-86dd-c5567e05c5cc" alt="notion image" loading="lazy" decoding="async"/></div></figure></div><div class="notion-spacer"></div></div><div class="notion-blank notion-block-2b66d25d51b58118a675ca3027f9845c"> </div><div class="notion-blank notion-block-2b66d25d51b581978859f5181144b820"> </div></main></div>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[EP006：VLOOKUP的致命硬伤以及PQ合并查询如何来拯救？]]></title>
            <link>https://docs.xiaoweihome.cn/article/2946d25d-51b5-8060-8505-c45c7d90b1e2</link>
            <guid>https://docs.xiaoweihome.cn/article/2946d25d-51b5-8060-8505-c45c7d90b1e2</guid>
            <pubDate>Wed, 22 Oct 2025 00:00:00 GMT</pubDate>
            <content:encoded><![CDATA[<div id="notion-article" class="mx-auto overflow-hidden "><main class="notion light-mode notion-page notion-block-2946d25d51b580608505c45c7d90b1e2"><div class="notion-viewport"></div><div class="notion-collection-page-properties"></div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-2946d25d51b58097a2aedaf6b4cf3908"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3A97cc2680-d231-4782-b27b-027985188387%3A%E8%80%81%E6%B1%AA%E6%B4%9E%E5%AF%9F_%E5%85%AC%E4%BC%97%E5%8F%B7_%E9%A1%B6%E9%83%A8_GIF.gif?table=block&amp;id=2946d25d-51b5-8097-a2ae-daf6b4cf3908&amp;t=2946d25d-51b5-8097-a2ae-daf6b4cf3908" alt="notion image" loading="lazy" decoding="async"/></div></figure><hr class="notion-hr notion-block-2946d25d51b580e58b51eecc9509ac0d"/><div class="notion-text notion-block-2946d25d51b5808c8cf4ffdf76b39786">（本文3000字，阅读需要8分钟左右）</div><div class="notion-text notion-block-2946d25d51b5809e8a6dcd502f8afd67"><b>“超级VLOOKUP”</b>这个称呼，可以说是对<code class="notion-inline-code">Power Query合并查询</code>功能<b>最贴切、最形象、也是最经典的入门级描述</b>。</div><div class="notion-text notion-block-2946d25d51b58088a70eea4417bb3a17">它完美地抓住了这个功能的核心目的——从一张表中查找信息，并将其带到另一张表中。但是，“超级”这个词用得恰到好处，因为它在<b>能力、灵活性、稳健性和性能</b>上，都对<code class="notion-inline-code">VLOOKUP</code>实现了<b>全面的、碾压式的超越</b>。</div><div class="notion-text notion-block-2946d25d51b580909aede386216ea13c">今天就跟大家来深入探讨一下，这个“超级VLOOKUP”到底“超级”在哪里？</div><hr class="notion-hr notion-block-2946d25d51b5804d96f4c9b1a151cf2c"/><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-2946d25d51b580829ea5f09db431fcaa" data-id="2946d25d51b580829ea5f09db431fcaa"><span><div id="2946d25d51b580829ea5f09db431fcaa" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2946d25d51b580829ea5f09db431fcaa" title="VLOOKUP“英雄迟暮”：它能做什么，又有哪些“硬伤”？"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">VLOOKUP“英雄迟暮”：它能做什么，又有哪些“硬伤”？</span></span></h3><div class="notion-text notion-block-2946d25d51b580a9b6d6c0a7916b67b5">首先，我们要肯定在单元格区域数据处理场景下VLOOKUP的功绩。在Power Query出现之前，它是Excel数据关联的绝对王者。</div><ul class="notion-list notion-list-disc notion-block-2946d25d51b580e98fb4eb2027de59ec"><li><b>它能做的事</b>：在一个表格的<b>第一列</b>查找一个值，然后返回同一行中、你指定的<b>右侧某列</b>的值。</li></ul><ul class="notion-list notion-list-disc notion-block-2946d25d51b580abb903e24d664b9fe8"><li><b>它的“硬伤”（为什么它不够“超级”）</b>：</li><ul class="notion-list notion-list-disc notion-block-2946d25d51b580abb903e24d664b9fe8"><ol start="1" class="notion-list notion-list-numbered notion-block-2946d25d51b5809d9f58f74b5ab7e6ca" style="list-style-type:decimal"><li><b>只能向右看</b>：查找列必须是数据区域的<b>第一列</b>，这是它最致命的限制。</li></ol><ol start="2" class="notion-list notion-list-numbered notion-block-2946d25d51b580428e64cff179622a78" style="list-style-type:decimal"><li><b>不稳定的列号</b>：你需要手动数出返回结果在相对于查询区域第一列的第几列（比如3）。如果在原始查询区域表中插入或删除了列，这个数字就错了，公式会返回<code class="notion-inline-code">错误（#REF!）</code>或错误的结果。</li></ol><ol start="3" class="notion-list notion-list-numbered notion-block-2946d25d51b58068ac6afdf171869019" style="list-style-type:decimal"><li><b>只返回第一个匹配项</b>：如果有多条记录符合查找条件，VLOOKUP只会返回它找到的第一个，而忽略其他的。</li></ol><ol start="4" class="notion-list notion-list-numbered notion-block-2946d25d51b580cb8cccf0b3375fb2c4" style="list-style-type:decimal"><li><b>单一条件限制</b>：只能基于一个条件进行查找。如果需要同时满足“年份”和“产品ID”两个条件，就需要创建复杂的辅助列或使用数组公式。</li></ol><ol start="5" class="notion-list notion-list-numbered notion-block-2946d25d51b580968795e9ee83bf19ce" style="list-style-type:decimal"><li><b>性能问题</b>：在处理几十万行的大型数据集时，大量的VLOOKUP函数会让Excel文件变得异常卡顿和缓慢。</li></ol></ul></ul><hr class="notion-hr notion-block-2946d25d51b580c1bf81fc410390a356"/><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-2946d25d51b5805cb8add8f5589d9057" data-id="2946d25d51b5805cb8add8f5589d9057"><span><div id="2946d25d51b5805cb8add8f5589d9057" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2946d25d51b5805cb8add8f5589d9057" title="合并查询“王者归来”：到底“超级”在哪里？"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">合并查询“王者归来”：到底“超级”在哪里？</span></span></h3><div class="notion-text notion-block-2946d25d51b5805fb486ec0c98045746">Power Query的合并查询，不仅解决了VLOOKUP的所有硬伤，还提供了维度更高的数据处理能力。</div><table class="notion-simple-table notion-block-2946d25d51b580c2a969f59f9938ca14"><tbody><tr class="notion-simple-table-row notion-block-2946d25d51b580dd92e2f846c4bd31c0"><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>特性</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>标准VLOOKUP</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>“超级VLOOKUP”(合并查询)</b></div></td></tr><tr class="notion-simple-table-row notion-block-2946d25d51b580579094cdcdc5ba52be"><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>1. 查找方向</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>只能向右</b> (查找列必须在第一列)</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>任意方向</b> (任意列都可以作为查找/匹配列)</div></td></tr><tr class="notion-simple-table-row notion-block-2946d25d51b58044b56dff49c59f17a6"><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>2. 匹配条件</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>单一条件</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>多重条件</b> (可按住Ctrl，选择多个列同时进行匹配)</div></td></tr><tr class="notion-simple-table-row notion-block-2946d25d51b580b4b9b1cfe1ad511533"><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>3. 引用稳健性</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>脆弱</b> (依赖于相对固定的列号)</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>极其稳健</b> (基于列名称进行整列引用，不受列顺序变化影响)</div></td></tr><tr class="notion-simple-table-row notion-block-2946d25d51b580fda319d5805932a870"><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>4. 处理多重匹配</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>只返回第一个</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>返回所有匹配项</b> (以一个可展开的嵌套Table形式返回)</div></td></tr><tr class="notion-simple-table-row notion-block-2946d25d51b580cd8accebb03ed07423"><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>5. 匹配类型/逻辑</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">只有“精确匹配”和“近似匹配”</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>提供多种“连接类型(Join Kind)”</b> (这是最强大的地方!)</div></td></tr><tr class="notion-simple-table-row notion-block-2946d25d51b580ebbe57f21328f5f6ba"><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>6. 性能</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">在大数据量下<b>性能较差</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">经优化，处理<b>大数据量性能极高</b></div></td></tr><tr class="notion-simple-table-row notion-block-2946d25d51b5809ea629f570aca43f1b"><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>7. 模糊匹配</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">不支持</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>内置模糊匹配</b> (可以匹配有轻微拼写错误的文本)</div></td></tr></tbody></table><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-2946d25d51b580659f3bcf9edc2c826b" data-id="2946d25d51b580659f3bcf9edc2c826b"><span><div id="2946d25d51b580659f3bcf9edc2c826b" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2946d25d51b580659f3bcf9edc2c826b" title="重点解读：“连接类型”这个超能力"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>重点解读：“连接类型”这个超能力</b></span></span></h3><div class="notion-text notion-block-2946d25d51b580c3b0aae1ad627f3d20">VLOOKUP本质上只做了Power Query合并查询功能下的第一种连接，叫做<code class="notion-inline-code">“左外部连接”</code>——保留左表（你写公式的表）的所有行，把右表（查找范围）匹配上的信息带过来（注：这里的<code class="notion-inline-code">“左”</code>即指的是本表，<code class="notion-inline-code">“右”</code>即指的是被连接的表）。</div><div class="notion-text notion-block-2946d25d51b5802da1e9f0fc76d4f253">合并查询提供的“六大神器”连接如下：</div><ul class="notion-list notion-list-disc notion-block-2946d25d51b580f1949fe8531e2fe764"><li><b>左外部(Left Outer)</b>：VLOOKUP的完美替代品，保留左表的所有行。</li></ul><ul class="notion-list notion-list-disc notion-block-2946d25d51b5807a9e70d9ec60921869"><li><b>右外部(Right Outer)</b>：保留右表的所有行。</li></ul><ul class="notion-list notion-list-disc notion-block-2946d25d51b580d09496e3077f9c2c77"><li><b>完全外部(Full Outer)</b>：保留两张表的所有行，无论是否匹配上。</li></ul><ul class="notion-list notion-list-disc notion-block-2946d25d51b580989f53f4be5f809124"><li><b>内部(Inner)</b>：<b>只保留</b>在两张表中<b>都能</b>找到匹配的行。</li></ul><ul class="notion-list notion-list-disc notion-block-2946d25d51b580e18289cb534abf54be"><li><b>反左(Left Anti)</b>：<b>只保留</b>左表中，在右表<b>找不到</b>匹配的行。（<b>VLOOKUP无法做到！</b>这是数据核对、找茬的神器！）</li></ul><ul class="notion-list notion-list-disc notion-block-2946d25d51b58096a016f67cecd69e8a"><li><b>反右(Right Anti)</b>：<b>只保留</b>右表中，在左表<b>找不到</b>匹配的行。</li></ul><div class="notion-text notion-block-2946d25d51b580c2bfbfdbdadd813035">我们将在下一篇文章中详细的解读这六种连接。</div><hr class="notion-hr notion-block-2946d25d51b58053922fcfd9eb0e34e9"/><blockquote class="notion-quote notion-block-2946d25d51b58025a53ad6857fb0dbb0"><div>【点击文末<b>“阅读原文”</b>，获取本文使用到的及历史以来提及、发布的相关精选和原创资料，和我们一起充电，加入后可<b>享受每月6次免费咨询提问，帮助解决您的特定问题</b>！】</div></blockquote><hr class="notion-hr notion-block-2946d25d51b580c387f1dcbdb999f3b6"/><div class="notion-text notion-block-2946d25d51b580f8b605f1f6694f9467">如果本篇文章对您有帮助或启发，请帮我们<span class="notion-red"><code class="notion-inline-code">点赞、转发、推荐、关注</code></span>，让更多想转型财务BP、锻造<span class="notion-red"><code class="notion-inline-code">数据分析和可视化洞察能力</code></span>的财务同行们看到，关注<code class="notion-inline-code">【老汪洞察】</code>，不迷路！</div><div class="notion-text notion-block-2946d25d51b580299a48e10d2ac80fd5">若想获得更多<code class="notion-inline-code">制造业成本本管控、核算、全面预算、业财融合</code>方面的落地实操干货，加入我们的大本营是你的不二之选，快点击下方卡片看看吧！</div><div class="notion-blank notion-block-2946d25d51b580a0949fc21a225daf0e"> </div><blockquote class="notion-quote notion-block-2946d25d51b580caa410d585ae1e2e06"><div><span class="notion-orange"><b>温馨提示</b></span></div></blockquote><div class="notion-callout notion-gray_background_co notion-block-2946d25d51b580589853ce14886ae8fd"><div class="notion-page-icon-inline notion-page-icon-span"><span class="notion-page-icon" role="img" aria-label="🙏🏻">🙏🏻</span></div><div class="notion-callout-text"><span class="notion-red"><b>如果您不想错过</b></span><span class="notion-default"><code class="notion-inline-code"><b>【老汪洞察】</b></code></span><span class="notion-red"><b>的文章，请将我们设为&quot;星标&quot;，这样每次最新文章推送才会第一时间出现在您的订阅列表里。
</b></span><span class="notion-default"><b>方法：</b></span><span class="notion-red"><b>点击文章页面左上角蓝色文字“</b></span><span class="notion-default"><code class="notion-inline-code"><b>老汪洞察</b></code></span><span class="notion-red"><b>”进入主页，点击</b></span><span class="notion-default"><code class="notion-inline-code"><b>关注</b></code></span><span class="notion-red"><b>后，再点主页</b></span><span class="notion-default"><code class="notion-inline-code"><b>右上角&quot;...&quot;</b></code></span><span class="notion-red"><b>，然后选择</b></span><span class="notion-default"><code class="notion-inline-code"><b>&quot;设为星标&quot;</b></code></span><span class="notion-red"><b>，即可完成，感谢您的支持。</b></span></div></div><div class="notion-blank notion-block-2946d25d51b580328d1fc397e60e2d3c"> </div></main></div>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[EP009、EP010、EP011：Power Query功能详解之追加查询]]></title>
            <link>https://docs.xiaoweihome.cn/article/追加查询</link>
            <guid>https://docs.xiaoweihome.cn/article/追加查询</guid>
            <pubDate>Thu, 30 Oct 2025 00:00:00 GMT</pubDate>
            <content:encoded><![CDATA[<div id="notion-article" class="mx-auto overflow-hidden "><main class="notion light-mode notion-page notion-block-29a6d25d51b5805ea156ec7ebba80149"><div class="notion-viewport"></div><div class="notion-collection-page-properties"></div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-29a6d25d51b581d592d4c033b4c046ce"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3A97cc2680-d231-4782-b27b-027985188387%3A%E8%80%81%E6%B1%AA%E6%B4%9E%E5%AF%9F_%E5%85%AC%E4%BC%97%E5%8F%B7_%E9%A1%B6%E9%83%A8_GIF.gif?table=block&amp;id=29a6d25d-51b5-81d5-92d4-c033b4c046ce&amp;t=29a6d25d-51b5-81d5-92d4-c033b4c046ce" alt="notion image" loading="lazy" decoding="async"/></div></figure><hr class="notion-hr notion-block-29a6d25d51b581d5b460cfcbcee8b779"/><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-29a6d25d51b580aeb2b6ce6b59327b76" data-id="29a6d25d51b580aeb2b6ce6b59327b76"><span><div id="29a6d25d51b580aeb2b6ce6b59327b76" class="notion-header-anchor"></div><a class="notion-hash-link" href="#29a6d25d51b580aeb2b6ce6b59327b76" title="PowerQuery功能详解之追加查询"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">PowerQuery功能详解之追加查询</span></span></h2><div class="notion-text notion-block-29a6d25d51b580a98d06f1688fec5e9f">“追加查询”这个功能在<b>不同数据布局场景</b>下有不同的应用。追加查询的威力，并不仅仅局限于处理Excel文件。下面，我为您整理一份关于“追加查询”功能的、更完整的应用场景和原理概要。</div><hr class="notion-hr notion-block-29a6d25d51b580a895e0e56edb691257"/><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-29a6d25d51b580f19f61e45e7e11875a" data-id="29a6d25d51b580f19f61e45e7e11875a"><span><div id="29a6d25d51b580f19f61e45e7e11875a" class="notion-header-anchor"></div><a class="notion-hash-link" href="#29a6d25d51b580f19f61e45e7e11875a" title="一、“追加查询”功能完整应用场景"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>一、“追加查询”功能完整应用场景</b></span></span></h3><div class="notion-text notion-block-29a6d25d51b580ea8f6ac77534e069af"><b>核心思想</b>：将多个来源、但结构相似的数据，<b>垂直地、像叠罗汉一样堆叠</b>在一起，形成一个行数更多的、统一的数据集。</div><div class="notion-text notion-block-29a6d25d51b58084b858e9438e2ba414">普通职场人最常用的三种核心场景是：</div><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-29a6d25d51b58074be57fe0ca129891f" data-id="29a6d25d51b58074be57fe0ca129891f"><span><div id="29a6d25d51b58074be57fe0ca129891f" class="notion-header-anchor"></div><a class="notion-hash-link" href="#29a6d25d51b58074be57fe0ca129891f" title="1. 同一工作簿下的多个工作表"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>1. 同一工作簿下的多个工作表</b></span></span></h4><ul class="notion-list notion-list-disc notion-block-29a6d25d51b58083a1e8eb479859a07b"><li><b>场景描述</b>：您有一个Excel报告文件，里面包含了一月、二月、三月...等多个工作表，您需要将它们汇总成一张年度总表。</li></ul><ul class="notion-list notion-list-disc notion-block-29a6d25d51b5806da17bf9d2ca10abbf"><li><b>实现方式</b>：通过 数据 -&gt; 获取数据 -&gt; 从文件 -&gt; 从工作簿，连接到<b>当前这个工作簿本身</b>。Power Query会列出其中所有的工作表对象，然后您可以将它们全部选中并追加。</li></ul><ul class="notion-list notion-list-disc notion-block-29a6d25d51b580eda06cc01dd17be4b8"><li><b>关键技巧</b>：下面我们会深入探讨，为了让这个查询在文件移动后依然有效，最佳实践是使用<b>动态路径</b>（<code class="notion-inline-code">Excel.CurrentWorkbook()</code>）的方式来实现。</li></ul><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-29a6d25d51b580de946ceafbcef71265" data-id="29a6d25d51b580de946ceafbcef71265"><span><div id="29a6d25d51b580de946ceafbcef71265" class="notion-header-anchor"></div><a class="notion-hash-link" href="#29a6d25d51b580de946ceafbcef71265" title="2. 不同工作簿下的多个工作表"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>2. 不同工作簿下的多个工作表</b></span></span></h4><ul class="notion-list notion-list-disc notion-block-29a6d25d51b58067b590fdd7f4be1ab3"><li><b>场景描述</b>：您从不同的人或部门那里，收到了多个独立的Excel文件，比如华东区销售.xlsx、华北区销售.xlsx、华南区销售.xlsx。它们的内部结构完全一样，您需要将它们汇总成全国销售总表。</li></ul><ul class="notion-list notion-list-disc notion-block-29a6d25d51b58080bbdcc9ebb21128e1"><li><b>实现方式</b>：</li><ul class="notion-list notion-list-disc notion-block-29a6d25d51b58080bbdcc9ebb21128e1"><ol start="1" class="notion-list notion-list-numbered notion-block-29a6d25d51b580899af3f398f70ddb12" style="list-style-type:decimal"><li>在Power Query中，为<b>每一个</b>Excel文件分别创建一个<b>独立的数据源连接查询</b>（查询_华东, 查询_华北, 查询_华南）。</li></ol><ol start="2" class="notion-list notion-list-numbered notion-block-29a6d25d51b5809b867dc087054df204" style="list-style-type:decimal"><li>然后，使用 <b>“将查询追加为新查询”</b> 功能，将这几个独立的查询，合并成一个全新的、总的查询（全国销售总表）。</li></ol></ul></ul><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-29a6d25d51b580edb952f3895c5521df" data-id="29a6d25d51b580edb952f3895c5521df"><span><div id="29a6d25d51b580edb952f3895c5521df" class="notion-header-anchor"></div><a class="notion-hash-link" href="#29a6d25d51b580edb952f3895c5521df" title="3. 同一文件夹下的所有文件 - 这是最强大的用法！"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>3. 同一文件夹下的所有文件 - 这是最强大的用法！</b></span></span></h4><ul class="notion-list notion-list-disc notion-block-29a6d25d51b5801f8537d798316cf88a"><li><b>场景描述</b>：您有一个专门的文件夹，比如“月度销售报告”。每个月，您都会把最新月份的、格式完全一样的Excel或CSV报告文件<b>扔进</b>这个文件夹。您希望有一个报表，能自动地把这个文件夹里<b>所有</b>的报告都汇总起来。</li></ul><ul class="notion-list notion-list-disc notion-block-29a6d25d51b58070b856f8bceede53b0"><li><b>实现方式</b>：使用 <b>数据 -&gt; 获取数据 -&gt; 从文件 -&gt; 从文件夹</b>。</li></ul><ul class="notion-list notion-list-disc notion-block-29a6d25d51b5808a8eb8df1562b1c27b"><li><b>神奇之处</b>：</li><ul class="notion-list notion-list-disc notion-block-29a6d25d51b5808a8eb8df1562b1c27b"><li>您只需要设置一次查询。Power Query会创建一个“示例文件转换”的函数。</li><li>未来，当您向这个文件夹中<b>添加新的文件</b>（比如“四月销售.xlsx”）时，您<b>不需要做任何修改</b>！您只需要在最终的报表中点击一次“刷新”，Power Query会自动发现新文件，并将其内容追加到总表中。 </li><li>同样，如果您<b>删除了</b>或<b>更新了</b>文件夹里的某个文件，刷新后结果也会自动同步。</li></ul></ul><hr class="notion-hr notion-block-29a6d25d51b580488f8ff764f562795d"/><div class="notion-text notion-block-29a6d25d51b58058b916ecb5f0196d13">Power Query的追加功能远不止于Excel文件。它的强大之处在于，它可以追加<b>任何来源、只要结构能被统一</b>的数据。</div><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-29a6d25d51b580e4a3a5ebe30f58d0d9" data-id="29a6d25d51b580e4a3a5ebe30f58d0d9"><span><div id="29a6d25d51b580e4a3a5ebe30f58d0d9" class="notion-header-anchor"></div><a class="notion-hash-link" href="#29a6d25d51b580e4a3a5ebe30f58d0d9" title="4. 不同类型的多个文件"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>4. 不同类型的多个文件</b></span></span></h4><ul class="notion-list notion-list-disc notion-block-29a6d25d51b580a89c55e80539556faf"><li><b>场景描述</b>：您的销售数据一部分记录在Excel文件里，另一部分记录在CSV文件里，还有一部分记录在文本文档里。但它们的列结构是相似的。</li></ul><ul class="notion-list notion-list-disc notion-block-29a6d25d51b580b09bf1efc9a38afb62"><li><b>实现方式</b>：您可以先分别建立对Excel和CSV的查询，在Power Query内部将它们的列名和数据类型<b>清洗成完全一致的结构</b>，然后再将这两个查询追加在一起。</li></ul><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-29a6d25d51b5804daa5fddb9e50e236b" data-id="29a6d25d51b5804daa5fddb9e50e236b"><span><div id="29a6d25d51b5804daa5fddb9e50e236b" class="notion-header-anchor"></div><a class="notion-hash-link" href="#29a6d25d51b5804daa5fddb9e50e236b" title="5. 数据库中的多个表"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>5. 数据库中的多个表</b></span></span></h4><ul class="notion-list notion-list-disc notion-block-29a6d25d51b580078f60c3764be4175c"><li><b>场景描述</b>：在公司的SQL数据库中，由于性能或历史原因，销售数据被分成了Sales_2022、Sales_2023、Sales_2024等多张表。您需要分析近三年的总销售情况。</li></ul><ul class="notion-list notion-list-disc notion-block-29a6d25d51b58051b84dde8b0a567e8a"><li><b>实现方式</b>：在Power Query中，分别连接到这三张数据库表，然后将它们追加成一个查询。</li></ul><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-29a6d25d51b5801b8faacac5dd8c6db8" data-id="29a6d25d51b5801b8faacac5dd8c6db8"><span><div id="29a6d25d51b5801b8faacac5dd8c6db8" class="notion-header-anchor"></div><a class="notion-hash-link" href="#29a6d25d51b5801b8faacac5dd8c6db8" title="6. 网页或API的分页数据"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>6. 网页或API的分页数据</b></span></span></h4><ul class="notion-list notion-list-disc notion-block-29a6d25d51b58068a7a6e6c585e452e4"><li><b>场景描述</b>：您需要从一个网站或API接口获取数据，但这个接口为了防止服务器过载，每次只返回100条记录（即“分页”）。您需要获取全部的几千条数据。</li></ul><ul class="notion-list notion-list-disc notion-block-29a6d25d51b580c69aa8ecd222c84c7b"><li><b>实现方式</b>：您可以创建一个函数来获取指定页码的数据，然后调用这个函数获取第1页、第2页、第3页...的数据，并将所有返回的查询结果<b>追加</b>在一起，形成完整的数据集。</li></ul><hr class="notion-hr notion-block-29a6d25d51b5808c9223f85be0f473dc"/><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-29a6d25d51b58017b3fbeeb7ba28d59d" data-id="29a6d25d51b58017b3fbeeb7ba28d59d"><span><div id="29a6d25d51b58017b3fbeeb7ba28d59d" class="notion-header-anchor"></div><a class="notion-hash-link" href="#29a6d25d51b58017b3fbeeb7ba28d59d" title="总结：追加查询的应用场景"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>总结：追加查询的应用场景</b></span></span></h4><table class="notion-simple-table notion-block-29a6d25d51b580b0a8ead61312cca64c"><tbody><tr class="notion-simple-table-row notion-block-29a6d25d51b58088954feda10379f2fb"><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>场景</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>核心描述</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>解决的典型问题</b></div></td></tr><tr class="notion-simple-table-row notion-block-29a6d25d51b580c79dd1f0b36871ad04"><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>同一工作簿</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">将一个文件内部的多个Sheet/Table垂直合并。</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">汇总月度、季度报表；合并不同业务分类的子表。</div></td></tr><tr class="notion-simple-table-row notion-block-29a6d25d51b58012a862d4ad15bd4e8f"><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>不同工作簿</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">将多个独立的、结构相同的Excel文件垂直合并。</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">汇总来自不同分公司、不同部门的同类报告。</div></td></tr><tr class="notion-simple-table-row notion-block-29a6d25d51b5805491deee8c605ada41"><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>文件夹</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>(最强自动化)</b> 自动合并一个文件夹内所有符合条件的文件。</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>一劳永逸地</b>处理定期新增的报告文件（如月报、日报）。</div></td></tr><tr class="notion-simple-table-row notion-block-29a6d25d51b5802fbe62ed68a6102410"><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>不同文件类型</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">将Excel, CSV, TXT等不同类型但结构相似的文件合并。</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">整合历史遗留的、格式不统一的数据源。</div></td></tr><tr class="notion-simple-table-row notion-block-29a6d25d51b580e8980ffa8d690dc739"><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>数据库表</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">将数据库中结构相同的多个分表（如按年分的表）合并。</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">进行跨时间周期的大范围数据分析。</div></td></tr><tr class="notion-simple-table-row notion-block-29a6d25d51b580ffb16dfe5a6b9f129b"><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>Web/API分页</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">将网页或API返回的多个数据页面合并。</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">爬取和获取完整的线上数据集。</div></td></tr></tbody></table><div class="notion-text notion-block-29a6d25d51b5803cb210e5d6a7924134">所以，追加查询的本质是“垂直堆叠结构相似的数据”，那么无论数据来自何方，您都能灵活地运用这个强大的功能。</div><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-29c6d25d51b58003b845e8cadce6b6da" data-id="29c6d25d51b58003b845e8cadce6b6da"><span><div id="29c6d25d51b58003b845e8cadce6b6da" class="notion-header-anchor"></div><a class="notion-hash-link" href="#29c6d25d51b58003b845e8cadce6b6da" title="二、同一工作簿下的多个工作表的追加查询"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">二、同一工作簿下的多个工作表的追加查询</span></span></h3><div class="notion-text notion-block-29c6d25d51b5808abae4f485d1bfa1cb">这种情况有3个核心关键需要搞清楚</div><ul class="notion-list notion-list-disc notion-block-29c6d25d51b58034b2fac0da74c0824f"><li><b>① 逻辑健壮性：通过筛选防止查询的循环引用</b></li></ul><ul class="notion-list notion-list-disc notion-block-29c6d25d51b580a9af20e6de75cc9429"><li><b>② 路径健壮性：通过动态路径实现查询的可移植性</b></li></ul><ul class="notion-list notion-list-disc notion-block-29c6d25d51b58087b4eaca4a3b2d8d53"><li><b>③ 结构健壮性：通过动态列名实现查询的可扩展性</b></li></ul><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-29d6d25d51b5801c9e6ccd01a45d2b61" data-id="29d6d25d51b5801c9e6ccd01a45d2b61"><span><div id="29d6d25d51b5801c9e6ccd01a45d2b61" class="notion-header-anchor"></div><a class="notion-hash-link" href="#29d6d25d51b5801c9e6ccd01a45d2b61" title="以下视频为以上3项内容的完整讲解："><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">以下视频为以上3项内容的完整讲解：</span></span></h4><figure class="notion-asset-wrapper notion-asset-wrapper-embed notion-block-29d6d25d51b58007b887fddaddd645b9"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:320px"><iframe class="notion-asset-object-fit" src="https://player.bilibili.com/player.html?isOutside=true&amp;aid=115464155960687&amp;bvid=BV1mDyeBHESq&amp;cid=33538442078&amp;p=1&amp;spaceId=e4254d42-b947-47ab-a59f-847895c5d80f" title="iframe embed" frameBorder="0" allowfullscreen="" loading="lazy" scrolling="auto"></iframe></div></figure><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-29d6d25d51b5801b8e55d1a680ab41bf" data-id="29d6d25d51b5801b8e55d1a680ab41bf"><span><div id="29d6d25d51b5801b8e55d1a680ab41bf" class="notion-header-anchor"></div><a class="notion-hash-link" href="#29d6d25d51b5801b8e55d1a680ab41bf" title="本视频教案下载地："><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">本视频教案下载地：</span></span></h4><div class="notion-file notion-block-29d6d25d51b5803194bfddaa189e1a2e"><a target="_blank" rel="noopener noreferrer" class="notion-file-link" href="https://file.notion.so/f/f/e4254d42-b947-47ab-a59f-847895c5d80f/76bbd9a7-3555-4dd7-9d7e-790547f9b8a2/%E6%95%99%E6%A1%88%E8%A1%A8%EF%BC%88E09_%E8%AE%B2%E9%80%8F%E8%BF%BD%E5%8A%A0%E6%9F%A5%E8%AF%A2%E4%BB%A5%E5%8F%8A%E5%88%9D%E8%AF%86M%E5%87%BD%E6%95%B0%EF%BC%88%E6%B1%87%E6%80%BB%E5%90%8C%E4%B8%80%E5%B7%A5%E4%BD%9C%E7%B0%BF%E4%B8%8B%E5%A4%9A%E4%B8%AA%E5%B7%A5%E4%BD%9C%E8%A1%A8%EF%BC%89%EF%BC%89.xlsx?table=block&amp;id=29d6d25d-51b5-8031-94bf-ddaa189e1a2e&amp;spaceId=e4254d42-b947-47ab-a59f-847895c5d80f&amp;expirationTimestamp=1771185600000&amp;signature=j3vKFOWHsiM3Ij_MbJovCNzC5mfTCRwaH3fJC-lQFwk"><svg class="notion-file-icon" viewBox="0 0 30 30"><path d="M22,8v12c0,3.866-3.134,7-7,7s-7-3.134-7-7V8c0-2.762,2.238-5,5-5s5,2.238,5,5v12c0,1.657-1.343,3-3,3s-3-1.343-3-3V8h-2v12c0,2.762,2.238,5,5,5s5-2.238,5-5V8c0-3.866-3.134-7-7-7S6,4.134,6,8v12c0,4.971,4.029,9,9,9s9-4.029,9-9V8H22z"></path></svg><div class="notion-file-info"><div class="notion-file-title">教案表（E09 讲透追加查询以及初识M函数（汇总同一工作簿下多个工作表））.xlsx</div><div class="notion-file-size">93.6 KiB</div></div></a></div><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-29d6d25d51b58015869cedad4248a41f" data-id="29d6d25d51b58015869cedad4248a41f"><span><div id="29d6d25d51b58015869cedad4248a41f" class="notion-header-anchor"></div><a class="notion-hash-link" href="#29d6d25d51b58015869cedad4248a41f" title="以下为文字版和相关的代码资源："><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">以下为文字版和相关的代码资源：</span></span></h4><hr class="notion-hr notion-block-29c6d25d51b580edb736e42b0133250b"/><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-29c6d25d51b580b79e50ebfe338b187a" data-id="29c6d25d51b580b79e50ebfe338b187a"><span><div id="29c6d25d51b580b79e50ebfe338b187a" class="notion-header-anchor"></div><a class="notion-hash-link" href="#29c6d25d51b580b79e50ebfe338b187a" title="主题①：逻辑健壮性 — 通过筛选防止查询的循环引用"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>主题①：逻辑健壮性 — 通过筛选防止查询的循环引用</b></span></span></h4><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-29c6d25d51b5804da3d8d5b15eca5579" data-id="29c6d25d51b5804da3d8d5b15eca5579"><span><div id="29c6d25d51b5804da3d8d5b15eca5579" class="notion-header-anchor"></div><a class="notion-hash-link" href="#29c6d25d51b5804da3d8d5b15eca5579" title="1. 痛点呈现"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>1. 痛点呈现</b></span></span></h4><div class="notion-text notion-block-29c6d25d51b580fc9b99e3bd5e64a8c5">在我们使用Power Query处理“数据源与结果在同一工作簿”的场景时，一个极其危险的“幽灵”常常不请自来。</div><div class="notion-text notion-block-29c6d25d51b58056b284d92bc8abb227"><b>现象</b>：您第一次刷新查询，得到了6行正确的汇总数据。但是，当您第二次、第三次刷新时，数据量会莫名其妙地变成12行、24行，甚至更多。每一次刷新，都会让数据成倍增长，最终导致整个报表的数据完全错误，我们称之为“数据爆炸”<b>或</b>“循环引用”。</div><div class="notion-text notion-block-29c6d25d51b58013a45adf86fb06a487"><b>复现场景</b>：
假设我们已经通过动态路径连接到了当前工作簿，并展开了所有工作表的数据。此时，我们的数据看起来像这样（简化版）：</div><table class="notion-simple-table notion-block-29c6d25d51b580f39b05fe1a1b6d294d"><tbody><tr class="notion-simple-table-row notion-simple-table-header-row notion-block-29c6d25d51b580d6a2f7f4b54abf2039"><td class="" style="width:120px"><div class="notion-simple-table-cell">Name</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">员工姓名</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">销售额</div></td></tr><tr class="notion-simple-table-row notion-block-29c6d25d51b5800294b0cb350ec89181"><td class="" style="width:120px"><div class="notion-simple-table-cell">Q1_Sales</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">张三</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">5000</div></td></tr><tr class="notion-simple-table-row notion-block-29c6d25d51b580be8fa4d065ed8edb60"><td class="" style="width:120px"><div class="notion-simple-table-cell">Q1_Sales</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">李四</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">3500</div></td></tr><tr class="notion-simple-table-row notion-block-29c6d25d51b580d8beedd7c595f7bbff"><td class="" style="width:120px"><div class="notion-simple-table-cell">Q2_Sales</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">王五</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">8000</div></td></tr><tr class="notion-simple-table-row notion-block-29c6d25d51b580c2a506c1b934e67b13"><td class="" style="width:120px"><div class="notion-simple-table-cell">...</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">...</div></td><td class="" style="width:120px"><div class="notion-simple-table-cell">...</div></td></tr><tr class="notion-simple-table-row notion-block-29c6d25d51b5801198bee702b796a079"><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>追加1</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>张三</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>5000</b></div></td></tr><tr class="notion-simple-table-row notion-block-29c6d25d51b580deb67fc2e4d8e4420d"><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>追加1</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>李四</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>3500</b></div></td></tr><tr class="notion-simple-table-row notion-block-29c6d25d51b5800c9bf6ef2f3f973c36"><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>追加1</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>王五</b></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><b>8000</b></div></td></tr></tbody></table><div class="notion-text notion-block-29c6d25d51b580179ce7e0f34eb19858">您会发现，Power Query不仅读取了原始的<code class="notion-inline-code">Q1_Sales</code>、<code class="notion-inline-code">Q2_Sales</code>等工作表，还把它自己上次加载回去的那个结果表（这里假设名为<code class="notion-inline-code">追加1</code>）也当作了新的源数据，一起给合并进来了。</div><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-29c6d25d51b580b49571fbc98470e229" data-id="29c6d25d51b580b49571fbc98470e229"><span><div id="29c6d25d51b580b49571fbc98470e229" class="notion-header-anchor"></div><a class="notion-hash-link" href="#29c6d25d51b580b49571fbc98470e229" title="2. 原因剖析"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>2. 原因剖析</b></span></span></h4><div class="notion-text notion-block-29c6d25d51b580769fedf7ae4ba289db">这个问题的根源在于我们使用的<code class="notion-inline-code">Excel.Workbook()</code>函数。</div><ul class="notion-list notion-list-disc notion-block-29c6d25d51b580e691b0c04711714380"><li><code class="notion-inline-code"><b>Excel.Workbook()</b></code><b>的工作机制</b>：这个函数会忠实地扫描并列出指定Excel文件中<b>所有</b>的对象，包括所有的工作表(Sheets)、已定义的表格(Tables)和已定义名称(Defined Names)。</li></ul><ul class="notion-list notion-list-disc notion-block-29c6d25d51b580d8bd72d36bf7befc0b"><li><b>循环的产生</b>：</li><ul class="notion-list notion-list-disc notion-block-29c6d25d51b580d8bd72d36bf7befc0b"><ol start="1" class="notion-list notion-list-numbered notion-block-29c6d25d51b580e7aeadc627d4769e80" style="list-style-type:decimal"><li>我们的查询指令是：“请读取<b>当前这个文件</b>里所有的工作表。”</li></ol><ol start="2" class="notion-list notion-list-numbered notion-block-29c6d25d51b5807083bbc53fe6bb3f2a" style="list-style-type:decimal"><li>第一次运行时，它正确地读取了<code class="notion-inline-code">Q1_Sales</code>, <code class="notion-inline-code">Q2_Sales</code>... 并将结果加载到了一个<b>新的工作表</b>，比如<code class="notion-inline-code">追加1</code>.</li></ol><ol start="3" class="notion-list notion-list-numbered notion-block-29c6d25d51b580048980f5116e70981e" style="list-style-type:decimal"><li>第二次刷新时，Power Query再次执行第一条指令。但这一次，当它扫描“当前这个文件”时，它发现工作表的列表里，除了原始的<code class="notion-inline-code">Q1_Sales</code>等，还<b>多了一个</b>我们上次创建的<code class="notion-inline-code">追加1</code>。</li></ol><ol start="4" class="notion-list notion-list-numbered notion-block-29c6d25d51b58000bfd9c8b0a2c2a5b1" style="list-style-type:decimal"><li>由于我们没有告诉它要排除<code class="notion-inline-code">追加1</code>，它便忠实地将<code class="notion-inline-code">追加1</code>也作为原材料，和<code class="notion-inline-code">Q1_Sales</code>等一起进行了合并。</li></ol><ol start="5" class="notion-list notion-list-numbered notion-block-29c6d25d51b5801a994eff7760be352f" style="list-style-type:decimal"><li>这就形成了一个恶性循环：<b>查询的结果，成为了下一次查询的源头之一。</b></li></ol></ul></ul><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-29c6d25d51b58045be25e5183f2ab614" data-id="29c6d25d51b58045be25e5183f2ab614"><span><div id="29c6d25d51b58045be25e5183f2ab614" class="notion-header-anchor"></div><a class="notion-hash-link" href="#29c6d25d51b58045be25e5183f2ab614" title="3. 解决方案"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>3. 解决方案</b></span></span></h4><div class="notion-text notion-block-29c6d25d51b58078a0b1cb735ee5ca9c">解决方案的核心思想非常直接：我们必须在数据处理的早期阶段，就通过“筛选”操作，明确地告诉Power Query，哪些是“原材料”，哪些是我们自己创造的“成品”，绝对不能混淆。</div><div class="notion-text notion-block-29c6d25d51b5807cba6bc366ed750e05"><b>操作步骤：</b></div><ol start="1" class="notion-list notion-list-numbered notion-block-29c6d25d51b580258c88f2fd40663f08" style="list-style-type:decimal"><li><b>定位到关键步骤</b>：在Power Query编辑器的“应用的步骤”列表中，找到并选中“源 (Source)”这一步（或者是紧接着它的某一步，只要能看到所有工作表/表格的列表即可）。</li></ol><ol start="2" class="notion-list notion-list-numbered notion-block-29c6d25d51b58028b933ebd1608b1d1a" style="list-style-type:decimal"><li><b>应用筛选规则</b>：</li><ol class="notion-list notion-list-numbered notion-block-29c6d25d51b58028b933ebd1608b1d1a" style="list-style-type:lower-alpha"><ul class="notion-list notion-list-disc notion-block-29c6d25d51b58074af04e402d6830970"><li>此时，您的预览窗口应该有一个名为<code class="notion-inline-code">Name</code>的列，其中列出了<code class="notion-inline-code">Q1_Sales</code>, <code class="notion-inline-code">Q2_Sales</code>, <code class="notion-inline-code">Config</code>, <code class="notion-inline-code">追加1</code>等所有对象的名称。</li></ul><ul class="notion-list notion-list-disc notion-block-29c6d25d51b5802392eafdf86d0cc352"><li>点击 <code class="notion-inline-code"><b>Name</b></code> 列的筛选下拉箭头 <code class="notion-inline-code">▼</code>。</li></ul><ul class="notion-list notion-list-disc notion-block-29c6d25d51b58078b699edc15c030554"><li>在弹出的列表中，<b>取消勾选</b>那个代表您最终汇总结果的工作表名称（<code class="notion-inline-code">追加1</code>），以及其他任何不属于原始数据的工作表（如<code class="notion-inline-code">Config</code>）。</li></ul><ul class="notion-list notion-list-disc notion-block-29c6d25d51b58016a700cb85654a4b6e"><li>点击“确定”。</li></ul></ol></ol><ol start="3" class="notion-list notion-list-numbered notion-block-29c6d25d51b58077a943e3d1976526ad" style="list-style-type:decimal"><li><b>代码层面的变化</b>：
可以直接忽略，参考界面操作步骤即可。</li></ol><div class="notion-text notion-block-29c6d25d51b5802f996ae08b30295815"><b>最终效果：</b>
通过添加这一步筛选，我们的查询“配方”里就有了一条明确的指令：“在进行任何合并操作之前，请<b>永远忽略</b>名为<code class="notion-inline-code">追加1</code>和<code class="notion-inline-code">Config</code>这一类的非源数据工作表。” 这样，无论我们刷新多少次，Power Query都只会处理我们指定的、真正的原始数据，循环被彻底打破，查询的逻辑健壮性得到了保证。</div><hr class="notion-hr notion-block-29c6d25d51b58071b7fade367bbeb410"/><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-29c6d25d51b58013be76c861f7c22a8a" data-id="29c6d25d51b58013be76c861f7c22a8a"><span><div id="29c6d25d51b58013be76c861f7c22a8a" class="notion-header-anchor"></div><a class="notion-hash-link" href="#29c6d25d51b58013be76c861f7c22a8a" title="主题②：路径健壮性 — 通过动态路径实现查询的可移植性"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>主题②：路径健壮性 — 通过动态路径实现查询的可移植性</b></span></span></h4><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-29c6d25d51b5801bbf8dfa865c7af627" data-id="29c6d25d51b5801bbf8dfa865c7af627"><span><div id="29c6d25d51b5801bbf8dfa865c7af627" class="notion-header-anchor"></div><a class="notion-hash-link" href="#29c6d25d51b5801bbf8dfa865c7af627" title="1. 痛点呈现"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>1. 痛点呈现</b></span></span></h4><div class="notion-text notion-block-29c6d25d51b58004bb3acfbfaa44b21a">我们构建自动化报表的初衷，是为了“一劳永逸”。但很多初学者很快就会发现一个令人沮丧的事实：这个“一劳永逸”是有条件的，条件就是——<b>“文件永远不能动！”</b></div><div class="notion-text notion-block-29c6d25d51b5803a8bf8d07e1c6f536f"><b>现象</b>：您精心制作了一个Power Query自动化报表，它在您的电脑上完美运行。但是，当您遇到以下任何一种情况时，灾难就会发生：</div><ul class="notion-list notion-list-disc notion-block-29c6d25d51b580e3a5d3f27460860191"><li>您为了整理桌面，把这个Excel文件从<code class="notion-inline-code">桌面</code>移动到了<code class="notion-inline-code">D:\\我的工作\\报告</code>文件夹。</li></ul><ul class="notion-list notion-list-disc notion-block-29c6d25d51b580e98674fc8753a679fd"><li>您将这个Excel文件通过邮件<b>发送给您的同事</b>。</li></ul><ul class="notion-list notion-list-disc notion-block-29c6d25d51b580d19081cb2e218f67e0"><li>您将整个项目文件夹上传到了共享网络驱动器。</li></ul><div class="notion-text notion-block-29c6d25d51b580009fe8f6fc1af9e694">在以上任何一种情况下，当您或您的同事试图点击“刷新”时，Power Query会立刻“翻脸不认人”，弹出一个冰冷的错误提示：
<code class="notion-inline-code"><b>DataSource.Error: Could not find file &#x27;C:\\Users\\你的名字\\Desktop\\原始数据.xlsx&#x27;.</b></code></div><div class="notion-text notion-block-29c6d25d51b580e4884adf5de5bfb056"><b>结果</b>：整个自动化流程在第一步就宣告失败。您不得不进入每一个查询，手动修改文件路径，极大地削减了自动化的价值，也让文件协作变得异常困难。</div><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-29c6d25d51b58091a05dd2b65ce66d6c" data-id="29c6d25d51b58091a05dd2b65ce66d6c"><span><div id="29c6d25d51b58091a05dd2b65ce66d6c" class="notion-header-anchor"></div><a class="notion-hash-link" href="#29c6d25d51b58091a05dd2b65ce66d6c" title="2. 原因剖析"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>2. 原因剖析</b></span></span></h4><div class="notion-text notion-block-29c6d25d51b58087a3c7ea094ae6dfc3">这个问题的根源在于，标准的“获取数据”方法，在Power Query中记录的是一个<b>写死的、绝对的路径</b>。</div><ul class="notion-list notion-list-disc notion-block-29c6d25d51b580c181fae6e91ecd250f"><li><b>绝对路径 (Absolute Path)</b>：这是一个从电脑的“根目录”（如<code class="notion-inline-code">C:\\</code>）开始的、完整的、独一无二的文件地址。它就像一个完整的家庭住址，包含了国家、省、市、街道、门牌号。</li></ul><ul class="notion-list notion-list-disc notion-block-29c6d25d51b58051a499eea3ab8b985f"><li><b>Power Query的默认行为</b>：当您通过 <code class="notion-inline-code">获取数据 -&gt; 从文件</code> 连接到一个Excel工作簿时，Power Query的“源”步骤会忠实地记录下这个绝对路径。</li><ul class="notion-list notion-list-disc notion-block-29c6d25d51b58051a499eea3ab8b985f"><div class="notion-text notion-block-29c6d25d51b580b5abcfdfb046870977">其M语言代码如下所示，路径部分是一个<b>纯文本字符串</b>：</div></ul></ul><ul class="notion-list notion-list-disc notion-block-29c6d25d51b580aba5c2d4cddca6ef3f"><li><b>问题所在</b>：这个“地址”是<b>硬编码 (Hard-coded)</b> 的。Power Query就像一个只会按固定地址送信的“笨邮差”，它不知道文件已经“搬家”了。当文件位置发生任何变化，这个写死的地址就变成了一个无效地址，导致“查无此件”。</li></ul><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-29c6d25d51b580c5881aed0261923d54" data-id="29c6d25d51b580c5881aed0261923d54"><span><div id="29c6d25d51b580c5881aed0261923d54" class="notion-header-anchor"></div><a class="notion-hash-link" href="#29c6d25d51b580c5881aed0261923d54" title="3. 解决方案"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>3. 解决方案</b></span></span></h4><div class="notion-text notion-block-29c6d25d51b5807984c1ea4e49a69848">解决方案的核心思想，是把Power Query从一个“笨邮差”升级为一个“智能侦探”。我们不再给它一个写死的地址，而是<b>赋予它一种“随时找到自己在哪”的能力</b>。</div><div class="notion-text notion-block-29c6d25d51b580279d46dea4def37540">这需要Excel和Power Query的协同作战。</div><div class="notion-text notion-block-29c6d25d51b580478d01c244b6641933"><b>第一步：在Excel中创建一个“动态路径信标”</b></div><div class="notion-text notion-block-29c6d25d51b58012a216f7a346a55a1f">我们首先需要在Excel文件内部，创建一个能实时报告自己位置的“信标”。</div><ol start="1" class="notion-list notion-list-numbered notion-block-29c6d25d51b580cc97a2e55491d4fbe8" style="list-style-type:decimal"><li><b>新建配置工作表</b>：在您的Excel工作簿中，新建一个工作表，命名为<code class="notion-inline-code">Config</code>（或“路径”等您自己能看懂的名字）。</li></ol><ol start="2" class="notion-list notion-list-numbered notion-block-29c6d25d51b5803e88f1d660eee70090" style="list-style-type:decimal"><li><b>使用</b><code class="notion-inline-code"><b>CELL</b></code><b>函数</b>：在<code class="notion-inline-code">Config</code>工作表的任意单元格（比如A10），输入这个Excel函数：
<code class="notion-inline-code">=CELL(&quot;filename&quot;, A10)</code>
这个函数会立即返回当前工作簿的完整文件路径，例如：<code class="notion-inline-code">C:\\我的工作\\报告\\[我的分析文件.xlsx]Config</code>。这个路径是<b>动态的</b>，您把文件移到哪里，它就会自动更新成新的路径。但是他是取到工作表级别的路径的，我们只需要取到工作簿路径即可。按下面的函数继续取数。<code class="notion-inline-code">=SUBSTITUTE(LEFT(CELL(&quot;filename&quot;,A10),FIND(&quot;]&quot;,CELL(&quot;filename&quot;,A10))-1),&quot;[&quot;,&quot;&quot;)</code></li></ol><ol start="3" class="notion-list notion-list-numbered notion-block-29c6d25d51b580c483e1f62a7388ef29" style="list-style-type:decimal"><li><b>定义名称</b>：选中A10单元格，点击顶部 <b>“公式” -&gt; “定义名称”</b>。在“名称”输入框中，给它起一个简洁、有意义的名字，比如 <code class="notion-inline-code"><b>工作簿路径</b></code>。点击“确定”。</li><ol class="notion-list notion-list-numbered notion-block-29c6d25d51b580c483e1f62a7388ef29" style="list-style-type:lower-alpha"><div class="notion-text notion-block-29c6d25d51b5802da335d101e59d9cf3"><em>（现在，我们就在Excel内部，创建了一个名为</em><em><code class="notion-inline-code">工作簿路径</code></em><em>的、随时可以引用的、代表当前文件路径的“全局变量”。）</em></div></ol></ol><div class="notion-text notion-block-29c6d25d51b580709848e2063a775f4e"><b>第二步：在Power Query中引用这个“信标”</b></div><div class="notion-text notion-block-29c6d25d51b58039993bc89e7b95c2e5">现在，我们回到Power Query，改造我们的“源”步骤。</div><ol start="1" class="notion-list notion-list-numbered notion-block-29c6d25d51b58041adebe443e21d0fe3" style="list-style-type:decimal"><li><b>定位到“源”步骤</b>：进入Power Query编辑器，选中需要修改的查询，并点击第一步“源”。</li></ol><ol start="2" class="notion-list notion-list-numbered notion-block-29c6d25d51b5807e8eebdefaeeb52e52" style="list-style-type:decimal"><li><b>修改M代码</b>：看向顶部的公式栏，找到那段包含绝对路径的代码。我们的目标，是用一段<code class="notion-inline-code">Excel.CurrentWorkbook(){[Name=&quot;工作簿路径&quot;]}[Content]{0}[Column1]</code><b>能够读取Excel已定义名称</b>的M代码，来替换掉那个<b>写死的路径字符串</b>。</li><ol class="notion-list notion-list-numbered notion-block-29c6d25d51b5807e8eebdefaeeb52e52" style="list-style-type:lower-alpha"><div class="notion-text notion-block-29c6d25d51b58014b856db10f1ae800c"><b>修改前</b>:</div><div class="notion-text notion-block-29c6d25d51b58087ba54c01164ccb617"><b>修改后 (针对数据源就是当前文件本身)</b>:</div><ul class="notion-list notion-list-disc notion-block-29c6d25d51b58041b9facc1a3f91e9f0"><li><b>代码解读（核心部分）</b>:</li><ul class="notion-list notion-list-disc notion-block-29c6d25d51b58041b9facc1a3f91e9f0"><li><code class="notion-inline-code">Excel.CurrentWorkbook(){[Name=&quot;工作簿路径&quot;]}[Content]{0}[Column1]</code>：这段代码的作用是：“在当前这个Excel工作簿里，找到名叫<code class="notion-inline-code">工作簿路径</code>的对象，并把它的值（那个长长的路径文本）取出来。”</li></ul></ul></ol></ol><div class="notion-text notion-block-29c6d25d51b580caa813e7aff9ad635a"><b>最终效果：</b>
经过改造后，“源”步骤的指令从“去这个写死的地址找文件”，变成了“<b>先问问Excel里的</b><code class="notion-inline-code"><b>工作簿路径</b></code><b>信标，当前文件在哪里，然后再去那个地址找文件</b>”。</div><div class="notion-text notion-block-29c6d25d51b580fbb037d4f71e6b5239">这样，无论您将这个Excel文件移动到任何地方，或者发给任何人，只要他一打开文件，<code class="notion-inline-code">CELL</code>函数就会自动更新路径，“信标”就会指向正确的位置。当他点击“刷新”时，Power Query就会根据“信标”的最新指示，准确无误地找到数据源，从而实现了查询的<b>完全可移植性</b>和<b>路径健壮性</b>。</div><hr class="notion-hr notion-block-29c6d25d51b58057ac24edf5ca65c96a"/><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-29c6d25d51b580a7b611cc2d2cd177c3" data-id="29c6d25d51b580a7b611cc2d2cd177c3"><span><div id="29c6d25d51b580a7b611cc2d2cd177c3" class="notion-header-anchor"></div><a class="notion-hash-link" href="#29c6d25d51b580a7b611cc2d2cd177c3" title="主题③：结构健壮性 — 通过动态列名实现查询的可扩展性"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>主题③：结构健壮性 — 通过动态列名实现查询的可扩展性</b></span></span></h4><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-29c6d25d51b580da893ed78081ecae2e" data-id="29c6d25d51b580da893ed78081ecae2e"><span><div id="29c6d25d51b580da893ed78081ecae2e" class="notion-header-anchor"></div><a class="notion-hash-link" href="#29c6d25d51b580da893ed78081ecae2e" title="1. 痛点呈现"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>1. 痛点呈现</b></span></span></h4><div class="notion-text notion-block-29c6d25d51b580dc80e7d6a9005ccbfa">我们已经构建了一个逻辑正确、路径稳健的查询。它现在看起来似乎“完美”了。但是，一个更隐蔽的“定时炸弹”已经埋下。</div><div class="notion-text notion-block-29c6d25d51b580a292bbfd9a9081cd5a"><b>现象</b>：您的自动化报表已经稳定运行了好几个月。突然有一天，业务部门通知您：“从这个季度开始，我们的源数据表中<b>增加了一个新的指标列</b>，比如‘销售成本’，请把它也加到您的汇总报表里。”</div><div class="notion-text notion-block-29c6d25d51b580db8a8ae04af8b3a3e8">您自信满满地把包含了新列的源数据文件放到指定位置，然后回到您的Power Query报表，点击“刷新”。刷新过程很顺利，没有报任何错误。但是，当您检查结果时，却沮-丧地发现——那个<b>新的“销售成本”列，根本没有出现！</b></div><div class="notion-text notion-block-29c6d25d51b580e38474c5b17340dd5a"><b>结果</b>：您的自动化流程“选择性失明”了。它无法自动适应源数据结构的变化，您不得不再次进入Power Query编辑器，手动修改查询，这让“一劳永逸”的承诺大打折扣。</div><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-29c6d25d51b580e4b615f1b1adc1bf15" data-id="29c6d25d51b580e4b615f1b1adc1bf15"><span><div id="29c6d25d51b580e4b615f1b1adc1bf15" class="notion-header-anchor"></div><a class="notion-hash-link" href="#29c6d25d51b580e4b615f1b1adc1bf15" title="2. 原因剖析"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>2. 原因剖析</b></span></span></h4><div class="notion-text notion-block-29c6d25d51b580988749e4a5a9a39153">这个问题的根源在于Power Query中 <b>“展开列 (Expand Column)”</b> 这个步骤的<b>默认行为</b>。</div><ul class="notion-list notion-list-disc notion-block-29c6d25d51b580eaa87bd3d7a7bd1266"><li><b>“展开”操作的背后</b>：当您使用 <code class="notion-inline-code">Excel.Workbook()</code> 函数获取数据后，会得到一个包含<code class="notion-inline-code">[Data]</code>列的元数据表，其中每一行的<code class="notion-inline-code">[Data]</code>都是一个嵌套的表格。为了将它们合并，您会点击<code class="notion-inline-code">[Data]</code>列的展开按钮。</li></ul><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-29d6d25d51b580069b08f705d7e60c3b"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3Aa2dbb679-8f2a-4d01-8bc0-828deb2f5487%3Aimage.png?table=block&amp;id=29d6d25d-51b5-8006-9b08-f705d7e60c3b&amp;t=29d6d25d-51b5-8006-9b08-f705d7e60c3b" alt="notion image" loading="lazy" decoding="async"/></div></figure><ul class="notion-list notion-list-disc notion-block-29c6d25d51b5809d8e0dfc38e3009d06"><li><b>默认行为：写死列名</b>：在您点击展开按钮时，Power Query会弹出一个菜单，让您选择要展开的列。当您点击“确定”后，Power Query会在后台生成一步M代码。这个代码会将您<b>当前</b>所选的所有列的<b>名称</b>，以一个<b>固定的文本列表</b>形式，<b>硬编码 (Hard-coded)</b> 在步骤中。</li><ul class="notion-list notion-list-disc notion-block-29c6d25d51b5809d8e0dfc38e3009d06"><div class="notion-text notion-block-29c6d25d51b58039b2fce3ca2b98d01a">这个M代码通常看起来像这样：</div></ul></ul><ul class="notion-list notion-list-disc notion-block-29c6d25d51b580029a91ed60163e488e"><li><b>问题所在</b>：这个步骤的“配方”被明确地定义为：“请展开<code class="notion-inline-code">Data</code>列，并且<b>只</b>提取出名为<code class="notion-inline-code">员工姓名</code>, <code class="notion-inline-code">销售区域</code>, <code class="notion-inline-code">产品ID</code>, <code class="notion-inline-code">销售额</code>的这几列。”</li></ul><ul class="notion-list notion-list-disc notion-block-29c6d25d51b580fda6c2fefccc481349"><li><b>“定时炸弹”引爆</b>：当您的源数据增加了新的<code class="notion-inline-code">“销售成本”</code>列后，刷新时，Power Query引擎依然会严格按照这份“旧配方”去执行。由于<code class="notion-inline-code">“销售成本”</code>这个名字<b>不在</b>那份写死的列表中，所以它就被<b>无情地、静默地忽略了</b>。</li></ul><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-29c6d25d51b580c79896d98eb9901512" data-id="29c6d25d51b580c79896d98eb9901512"><span><div id="29c6d25d51b580c79896d98eb9901512" class="notion-header-anchor"></div><a class="notion-hash-link" href="#29c6d25d51b580c79896d98eb9901512" title="3. 解决方案"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>3. 解决方案</b></span></span></h4><div class="notion-text notion-block-29c6d25d51b58041acc8e2df9e513ba1">解决方案的核心思想，是把那份“写死的列名清单”<b>，替换成一个</b>“动态生成的、能自动更新的列名清单”<b>。我们不再告诉Power Query具体要展开哪些列，而是赋予它一种能力，让它在每次刷新时，自己去</b>侦察<b>并</b>汇总所有应该被展开的列。</div><div class="notion-text notion-block-29c6d25d51b5804e8161e43bf11b2de1">这需要我们手动介入，用M语言构建一个动态列表。</div><div class="notion-text notion-block-29c6d25d51b58074af21ce134f017043"><b>操作步骤：</b></div><ol start="1" class="notion-list notion-list-numbered notion-block-29c6d25d51b58021b90cf036a07a734c" style="list-style-type:decimal"><li><b>定位到关键步骤之前</b>：在Power Query编辑器的“应用的步骤”列表中，找到并选中“展开列”(<code class="notion-inline-code">Expanded Data</code>或类似名称)<code class="notion-inline-code">这一步的“上一步”</code>。通常是您筛选完需要的工作表之后的那一步（比如在<code class="notion-inline-code">删除的其他列</code>之后）。</li><ol class="notion-list notion-list-numbered notion-block-29c6d25d51b58021b90cf036a07a734c" style="list-style-type:lower-alpha"><ul class="notion-list notion-list-disc notion-block-29c6d25d51b580809d6cdccd1c7e186f"><li>此时，您的预览窗口应该是一个元数据表，<code class="notion-inline-code">[Data]</code>列里包含了所有需要被合并的嵌套表格。</li></ul></ol></ol><ol start="2" class="notion-list notion-list-numbered notion-block-29c6d25d51b5809486f4dbcffb75192c" style="list-style-type:decimal"><li><b>插入步骤，创建动态列名列表</b>：</li><ol class="notion-list notion-list-numbered notion-block-29c6d25d51b5809486f4dbcffb75192c" style="list-style-type:lower-alpha"><ul class="notion-list notion-list-disc notion-block-29c6d25d51b580dbaf36d826090329f6"><li>点击公式栏左侧的 <code class="notion-inline-code"><b>fx</b></code> 按钮，插入一个新步骤。</li></ul><ul class="notion-list notion-list-disc notion-block-29c6d25d51b580e08bdae31364fd609c"><li>将公式栏中的内容，替换为下面这段“魔法代码”：</li></ul><ul class="notion-list notion-list-disc notion-block-29c6d25d51b580899690cc9997c1bd4f"><li><b>代码解读</b>：</li><ul class="notion-list notion-list-disc notion-block-29c6d25d51b580899690cc9997c1bd4f"><ol start="1" class="notion-list notion-list-numbered notion-block-29c6d25d51b5807093baf7b67b49fc6f" style="list-style-type:decimal"><li><code class="notion-inline-code">List.Transform(..., each Table.ColumnNames(_))</code>: <b>遍历</b>每一个嵌套表(<code class="notion-inline-code">[Data]</code>)，并<b>提取</b>出它们各自的列名列表。</li></ol><ol start="2" class="notion-list notion-list-numbered notion-block-29c6d25d51b5802d93aeffa81edc7eac" style="list-style-type:decimal"><li><code class="notion-inline-code">List.Combine(...)</code>: 将所有这些单独的列名列表，<b>合并</b>成一个包含所有列名（有重复）的大列表。</li></ol><ol start="3" class="notion-list notion-list-numbered notion-block-29c6d25d51b58057a074c4d9cabc87a6" style="list-style-type:decimal"><li><code class="notion-inline-code">List.Distinct(...)</code>: 对这个大列表进行<b>去重</b>，得到一个最终的、包含了所有源表中出现过的<b>全部唯一列名</b>的“超级列表”。</li></ol></ul></ul><ul class="notion-list notion-list-disc notion-block-29c6d25d51b580a6a68de279b7029f62"><li>按下回车后，这个步骤的结果就是那个动态生成的列名列表。将这个步骤重命名为一个有意义的名字，比如 <code class="notion-inline-code"><b>列标题</b></code>，是动态变动的。</li></ul></ol></ol><ol start="3" class="notion-list notion-list-numbered notion-block-29c6d25d51b580dda0b3e0418364fcab" style="list-style-type:decimal"><li><b>改造“展开列”步骤</b>：</li><ol class="notion-list notion-list-numbered notion-block-29c6d25d51b580dda0b3e0418364fcab" style="list-style-type:lower-alpha"><ul class="notion-list notion-list-disc notion-block-29c6d25d51b58002892ef93d39b7a533"><li>现在，重新选中您原来的“展开列”那一步。</li></ul><ul class="notion-list notion-list-disc notion-block-29c6d25d51b580bfaa5dd6aaac720c2a"><li>看向顶部的公式栏，找到那段写死的列名列表 <code class="notion-inline-code">{&quot;员工姓名&quot;, &quot;销售区域&quot;, ...}</code>。</li></ul><ul class="notion-list notion-list-disc notion-block-29c6d25d51b58052900ac82aaf2a70a9"><li><b>执行关键替换</b>：将这个<b>写死的列表</b>，直接替换为您上一步创建的<b>动态列表的名称</b> <code class="notion-inline-code">列标题</code>。</li></ul><div class="notion-text notion-block-29c6d25d51b580e5b212fe82855562b7"><b>修改前</b>:</div><div class="notion-text notion-block-29c6d25d51b5800dbb95d09c2016ebdb"><b>修改后</b>:</div></ol></ol><div class="notion-text notion-block-29c6d25d51b58084b733d3bd11c7cd75"><b>最终效果：</b>
经过改造后，整个查询的自动化流程变得极具<b>弹性</b>和<b>可扩展性</b>：</div><ol start="1" class="notion-list notion-list-numbered notion-block-29c6d25d51b580c3929bdd2c213a6caa" style="list-style-type:decimal"><li><b>刷新时</b>，Power Query首先会执行<code class="notion-inline-code">列标题</code>这一步，它会重新扫描所有最新的源数据，并生成一份包含了所有新旧列名的最新“超级列表”。</li></ol><ol start="2" class="notion-list notion-list-numbered notion-block-29c6d25d51b580879208da0fffde6092" style="list-style-type:decimal"><li>紧接着，当执行“展开列”步骤时，它不再依赖于一份过时的“旧清单”，而是直接使用刚刚生成的<code class="notion-inline-code">列标题</code>这个最新的、最全的清单来展开数据。</li></ol><div class="notion-text notion-block-29c6d25d51b5807da2f9dca30269c4c8">这样，无论未来您的源数据表增加、减少或修改了任何列，您的Power Query查询都能够<b>自动适应</b>这些结构上的变化，确保所有数据都能被准确无误地包含进来，从而实现了真正的“面向未来”的结构健壮性。</div><hr class="notion-hr notion-block-29a6d25d51b58129960bec37782621ba"/><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-2a06d25d51b5806990bee414a03b9ec1" data-id="2a06d25d51b5806990bee414a03b9ec1"><span><div id="2a06d25d51b5806990bee414a03b9ec1" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2a06d25d51b5806990bee414a03b9ec1" title="二、不同工作簿下的多个工作表的追加查询"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">二、不同工作簿下的多个工作表的追加查询</span></span></h3><div class="notion-blank notion-block-2a16d25d51b58062ac22d4426845b69a"> </div><figure class="notion-asset-wrapper notion-asset-wrapper-embed notion-block-2a16d25d51b580b1a434ee82901766d3"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:320px"><iframe class="notion-asset-object-fit" src="https://player.bilibili.com/player.html?isOutside=true&amp;aid=115486788426918&amp;bvid=BV1a51qBqEw2&amp;cid=33667811476&amp;p=1&amp;spaceId=e4254d42-b947-47ab-a59f-847895c5d80f" title="iframe embed" frameBorder="0" allowfullscreen="" loading="lazy" scrolling="auto"></iframe></div></figure><div class="notion-blank notion-block-2a16d25d51b5808c8bd5d4161dede562"> </div><div class="notion-text notion-block-2a16d25d51b580fb9522d72643b67993">在上面中，我们提到了如何汇总<b>同一个工作簿</b>内的多个工作表。但相信很多同学都会遇到一个更普遍的场景：数据源本身就是分散在<b>不同Excel文件</b>中的，比如<code class="notion-inline-code">一月销售.xlsx</code><span style="padding:0.5em"></span><code class="notion-inline-code">二月销售.xlsx</code>... 我们需要在一个全新的汇总工作簿文件中，将它们合并起来。</div><div class="notion-text notion-block-2a16d25d51b5805884dcd7c9a73cb4ab">下面，我们就来攻克这个难题。思路是构建一个强大的自动化报表，它不仅能汇总不同工作簿的数据，更能解决两个极其棘手的“痛点”：</div><ol start="1" class="notion-list notion-list-numbered notion-block-2a16d25d51b580519fd9c5c008c89826" style="list-style-type:decimal"><li><b>动态路径问题</b>：如何让你的查询在整个项目文件夹被移动或分享给他人后，依然能“一键刷新”？</li></ol><ol start="2" class="notion-list notion-list-numbered notion-block-2a16d25d51b5806f873bec820f1c3a02" style="list-style-type:decimal"><li><b>动态列问题</b>：当源数据增加了新的列，如何让汇总表自动把它包含进来？</li></ol><hr class="notion-hr notion-block-2a16d25d51b580c19d12fe364cd5c0ef"/><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-2a16d25d51b580aabc0ed27c8e242cee" data-id="2a16d25d51b580aabc0ed27c8e242cee"><span><div id="2a16d25d51b580aabc0ed27c8e242cee" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2a16d25d51b580aabc0ed27c8e242cee" title="第一部分：基础方法——快速合并，但隐患重重"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>第一部分：基础方法——快速合并，但隐患重重</b></span></span></h4><div class="notion-text notion-block-2a16d25d51b5808a8743d0dbdfc6eb04">我们先用最直接的方法来感受一下。假设我们有一个<code class="notion-inline-code">汇总分析.xlsx</code>文件，和三个数据源文件（<code class="notion-inline-code">工作簿1.xlsx</code>, <code class="notion-inline-code">工作簿2.xlsx</code>, <code class="notion-inline-code">工作簿3.xlsx</code>）存放在同一个文件夹中。</div><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-2a16d25d51b58029a3e5d3810b4b1629" data-id="2a16d25d51b58029a3e5d3810b4b1629"><span><div id="2a16d25d51b58029a3e5d3810b4b1629" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2a16d25d51b58029a3e5d3810b4b1629" title="操作步骤："><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>操作步骤：</b></span></span></h4><ol start="1" class="notion-list notion-list-numbered notion-block-2a16d25d51b5805f8eddec78a8382a89" style="list-style-type:decimal"><li><b>创建独立查询</b>：在<code class="notion-inline-code">汇总分析.xlsx</code>中，打开Power Query编辑器。通过 <b>“新建源” -&gt; “文件” -&gt; “Excel工作簿”</b>，分别为<code class="notion-inline-code">工作簿1</code>、<code class="notion-inline-code">工作簿2</code>和<code class="notion-inline-code">工作簿3</code>创建三个独立的查询。</li></ol><ol start="2" class="notion-list notion-list-numbered notion-block-2a16d25d51b5808b8873c60cf9a7c34c" style="list-style-type:decimal"><li><b>追加为新查询</b>：点击 <b>“主页” -&gt; “追加查询” -&gt; “将查询追加为新查询”</b>。在弹出的对话框中，选择“三个或更多表”，并将刚刚创建的三个查询全部添加进去。</li></ol><ol start="3" class="notion-list notion-list-numbered notion-block-2a16d25d51b5800da3a1edc9d7da1e63" style="list-style-type:decimal"><li><b>加载数据</b>：点击“关闭并上载”，将最终的汇总查询和三个中间查询都加载到Excel中。</li></ol><div class="notion-text notion-block-2a16d25d51b5806fa261d4b2d6a9a8f4">此时，一个初步的汇总表就完成了。我们测试一下，在<code class="notion-inline-code">工作簿1.xlsx</code>中增加一行数据，甚至增加一个“备注”列，回到<code class="notion-inline-code">汇总分析.xlsx</code>点击“全部刷新”，你会发现所有更改都能被正确更新。</div><div class="notion-text notion-block-2a16d25d51b580c79199faecd4fe5987"><b>注意</b>：这里的“新增列”之所以能成功刷新，是因为我们采用的是“独立查询后追加”的模式。Power Query在刷新每个独立查询时，会自动获取其最新的所有列，所以最终追加时，列信息是动态的。这与上节课<code class="notion-inline-code">Excel.Workbook()展开列</code>的机制有所不同。</div><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-2a16d25d51b5806d8023e6accc97d947" data-id="2a16d25d51b5806d8023e6accc97d947"><span><div id="2a16d25d51b5806d8023e6accc97d947" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2a16d25d51b5806d8023e6accc97d947" title="痛点演示：一碰就碎的“绝对路径”"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>痛点演示：一碰就碎的“绝对路径”</b></span></span></h4><div class="notion-text notion-block-2a16d25d51b580f882d5f45636f49dd6">看起来很完美，对吧？</div><div class="notion-text notion-block-2a16d25d51b580ee8539c43dbd74c504">现在，我们来模拟一个真实的工作场景：<b>将整个项目文件夹从“桌面”移动到“C盘”</b>。</div><div class="notion-text notion-block-2a16d25d51b580c7b5ded28e47f0d911"><em>（移动文件夹...）</em></div><div class="notion-text notion-block-2a16d25d51b580328831d08158c7a6c2">现在，我们重新打开<code class="notion-inline-code">汇总分析.xlsx</code>，再次点击“全部刷新”...</div><div class="notion-text notion-block-2a16d25d51b5809487edc5c0efc22dfb"><b>砰！报错了！</b></div><div class="notion-text notion-block-2a16d25d51b5801ba464e0063c37d453">Power Query会弹出错误，抱怨说“找不到位于‘桌面’的那个文件”。</div><div class="notion-text notion-block-2a16d25d51b580628570dc29e41f3bff"><b>这就是基础方法最致命的弱点：</b>它在查询中记录了每个数据源文件的<b>绝对路径</b>。一旦文件位置发生任何变化，整个自动化流程就会立刻瘫痪。</div><hr class="notion-hr notion-block-2a16d25d51b580e98378de47625ef5e9"/><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-2a16d25d51b5802084efe6df47c589e4" data-id="2a16d25d51b5802084efe6df47c589e4"><span><div id="2a16d25d51b5802084efe6df47c589e4" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2a16d25d51b5802084efe6df47c589e4" title="第二部分：终极解决方案——构建“永不迷路”的动态路径查询"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>第二部分：终极解决方案——构建“永不迷路”的动态路径查询</b></span></span></h4><div class="notion-text notion-block-2a16d25d51b580be87b2e5105d4cddc8">要解决这个问题，我们的核心思路是：<b>不再告诉Power Query一个写死的地址，而是赋予它一种能力，让它自己去计算出数据源文件当前在哪里。</b></div><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-2a16d25d51b580ac9e60feeffb78cf02" data-id="2a16d25d51b580ac9e60feeffb78cf02"><span><div id="2a16d25d51b580ac9e60feeffb78cf02" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2a16d25d51b580ac9e60feeffb78cf02" title="步骤一：在Excel中创建“路径配置中心”"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>步骤一：在Excel中创建“路径配置中心”</b></span></span></h4><ol start="1" class="notion-list notion-list-numbered notion-block-2a16d25d51b5803bb3e8c2b70c10934f" style="list-style-type:decimal"><li>在<code class="notion-inline-code">汇总分析.xlsx</code>文件中，新建一个工作表，命名为 <b>配置</b>。这个工作表将成为我们所有动态参数的“控制面板”。</li></ol><ol start="2" class="notion-list notion-list-numbered notion-block-2a16d25d51b5801bbfcbde11a76c7a80" style="list-style-type:decimal"><li>我们需要为每一个数据源文件（<code class="notion-inline-code">工作簿1.xlsx</code><span style="padding:0.5em"></span><code class="notion-inline-code"> 工作簿2.xlsx</code><span style="padding:0.5em"></span><code class="notion-inline-code"> 工作簿3.xlsx</code>）都生成一个动态路径。在配置工作表的A列，我们分别填入以下公式：</li><ol class="notion-list notion-list-numbered notion-block-2a16d25d51b5801bbfcbde11a76c7a80" style="list-style-type:lower-alpha"><div class="notion-text notion-block-2a16d25d51b5803fbb86fadab0f35acc"><b>示例（A1, A2, A3单元格分别填入）：</b></div><div class="notion-text notion-block-2a16d25d51b580618ecdf15ad48a7fd7"><code class="notion-inline-code">=LEFT(CELL(&quot;filename&quot;,A1),FIND(&quot;[&quot;,CELL(&quot;filename&quot;,A1))-1)&amp;&quot;工作簿1.xlsx&quot;</code></div><div class="notion-text notion-block-2a16d25d51b58076b373d19b3320ce73"><code class="notion-inline-code">=LEFT(CELL(&quot;filename&quot;,A2),FIND(&quot;[&quot;,CELL(&quot;filename&quot;,A2))-1)&amp;&quot;工作簿2.xlsx&quot;</code></div><div class="notion-text notion-block-2a16d25d51b5807192d7eb32e6f6570d"><code class="notion-inline-code">=LEFT(CELL(&quot;filename&quot;,A3),FIND(&quot;[&quot;,CELL(&quot;filename&quot;,A3))-1)&amp;&quot;工作簿3.xlsx&quot;</code></div></ol></ol><ul class="notion-list notion-list-disc notion-block-2a16d25d51b58080abcad7c5acce6bf3"><li><b>公式解读</b>：这个公式由 CELL(&quot;filename&quot;), LEFT, FIND 等函数组合而成。它的作用是先获取当前<code class="notion-inline-code">汇总分析.xlsx</code>文件所在的<b>文件夹路径</b>，然后在其后面拼接上我们已知的数据源文件名（如<code class="notion-inline-code">工作簿1.xlsx</code>），从而动态地构建出数据源的完整路径。</li></ul><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-2a16d25d51b580869173c835b4adf0c8" data-id="2a16d25d51b580869173c835b4adf0c8"><span><div id="2a16d25d51b580869173c835b4adf0c8" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2a16d25d51b580869173c835b4adf0c8" title="步骤二：为动态路径“命名”"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>步骤二：为动态路径“命名”</b></span></span></h4><div class="notion-text notion-block-2a16d25d51b580e5b39fdbb40958254a">为了让Power Query能轻松地找到并引用这些路径，我们需要为它们“定义名称”。</div><ol start="1" class="notion-list notion-list-numbered notion-block-2a16d25d51b5809e98f6fa88ee6e2599" style="list-style-type:decimal"><li>选中包含“工作簿1”路径的单元格（例如A1）。</li></ol><ol start="2" class="notion-list notion-list-numbered notion-block-2a16d25d51b5809b8917c7e32b2aa88a" style="list-style-type:decimal"><li>点击顶部菜单 <b>“公式” -&gt; “定义名称”</b>。</li></ol><ol start="3" class="notion-list notion-list-numbered notion-block-2a16d25d51b5806ea287f84ce7b05ca3" style="list-style-type:decimal"><li>输入名称，例如<code class="notion-inline-code"> </code><code class="notion-inline-code"><b>工作簿1 </b></code>，然后确定。</li></ol><ol start="4" class="notion-list notion-list-numbered notion-block-2a16d25d51b580aa8aa8e5a67067a5d9" style="list-style-type:decimal"><li>对其他几个路径单元格重复此操作，分别命名为<code class="notion-inline-code">工作簿2</code><span style="padding:0.5em"></span><code class="notion-inline-code">工作簿3</code>。</li></ol><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-2a16d25d51b58020939dc033ca8cd728" data-id="2a16d25d51b58020939dc033ca8cd728"><span><div id="2a16d25d51b58020939dc033ca8cd728" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2a16d25d51b58020939dc033ca8cd728" title="步骤三：改造Power Query查询——注入“GPS导航”"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>步骤三：改造Power Query查询——注入“GPS导航”</b></span></span></h4><div class="notion-text notion-block-2a16d25d51b580ce9872e26dcf1e67ec">现在，我们回到Power Query编辑器，对之前创建的三个独立查询进行“升级改造”。</div><ol start="1" class="notion-list notion-list-numbered notion-block-2a16d25d51b580cea71aef72f7e32f6f" style="list-style-type:decimal"><li>选中工作簿1的查询，在右侧“应用的步骤”中，点击<b>第一步“源”</b>。</li></ol><ol start="2" class="notion-list notion-list-numbered notion-block-2a16d25d51b580eeb009f0b67fdcfab9" style="list-style-type:decimal"><li>看顶部的<b>公式栏</b>，您会看到一个包含写死路径的M代码。</li></ol><ol start="3" class="notion-list notion-list-numbered notion-block-2a16d25d51b58053bb77dd4c69bcd867" style="list-style-type:decimal"><li><b>执行关键替换</b>：将公式中<b>写死的路径文本</b>（&quot;C:\...&quot; 这部分），替换为下面这段能够读取已定义名称的M函数代码：</li><ol class="notion-list notion-list-numbered notion-block-2a16d25d51b58053bb77dd4c69bcd867" style="list-style-type:lower-alpha"><ul class="notion-list notion-list-disc notion-block-2a16d25d51b580f497dbe80d253d1bbb"><li><b>代码示例</b>：</li><ul class="notion-list notion-list-disc notion-block-2a16d25d51b580f497dbe80d253d1bbb"><div class="notion-text notion-block-2a16d25d51b580c9ae14cb52e517a8a7"><code class="notion-inline-code">= Excel.CurrentWorkbook(){[Name=&quot;工作簿1&quot;]}[Content]{0}[Column1]</code></div><div class="notion-text notion-block-2a16d25d51b580168bf4c9d0471e86b4">用以上这个动态路径获取函数，获取“工作簿1”的实时路径，并且替换原来的被写死的路径。</div></ul></ul></ol></ol><ol start="4" class="notion-list notion-list-numbered notion-block-2a16d25d51b580edb446f86c73a53209" style="list-style-type:decimal"><li><b>修改后的完整“源”步骤代码应如下所示：</b></li><ol class="notion-list notion-list-numbered notion-block-2a16d25d51b580edb446f86c73a53209" style="list-style-type:lower-alpha"><div class="notion-text notion-block-2a16d25d51b580e7a4c6ff3d662a3919"><code class="notion-inline-code">= Excel.Workbook(File.Contents(Excel.CurrentWorkbook(){[Name=&quot;工作簿1&quot;]}[Content]{0}[Column1]), null, true)</code></div></ol></ol><ol start="5" class="notion-list notion-list-numbered notion-block-2a16d25d51b5802c8f91cd0c4a881b7e" style="list-style-type:decimal"><li>对工作簿2和工作簿3的查询重复此操作，确保将M代码中的<code class="notion-inline-code">Name=&quot;工作簿1&quot;</code>相应地修改为<code class="notion-inline-code">工作簿2</code>和<code class="notion-inline-code">工作簿3</code>。</li></ol><div class="notion-text notion-block-2a16d25d51b5802186bdd36a19cedead">修复完这三个查询的“源”之后，您会发现，那个最终的追加查询也自动恢复正常了！</div><hr class="notion-hr notion-block-2a16d25d51b5802cbf71d696b371b27b"/><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-2a16d25d51b58011a694defe87ea9817" data-id="2a16d25d51b58011a694defe87ea9817"><span><div id="2a16d25d51b58011a694defe87ea9817" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2a16d25d51b58011a694defe87ea9817" title="第三部分：最终验证与总结"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>第三部分：最终验证与总结</b></span></span></h4><div class="notion-text notion-block-2a16d25d51b580e09312c3cf5614c187">现在，关闭并上载您的查询。我们再来做一次“终极测试”：</div><ul class="notion-list notion-list-disc notion-block-2a16d25d51b5802288fff6e76422f0b1"><li>将整个项目文件夹<b>再次移动</b>到任意一个新的位置。</li></ul><ul class="notion-list notion-list-disc notion-block-2a16d25d51b580e3941fd3d995954a0f"><li>打开<code class="notion-inline-code">汇总分析.xlsx</code>，修改任意一个源文件的数据（增行、增列、改值）。</li></ul><ul class="notion-list notion-list-disc notion-block-2a16d25d51b5806b9659f4f2ce44afa9"><li>回到<code class="notion-inline-code">汇总分析.xlsx</code>，点击“全部刷新”。</li></ul><div class="notion-text notion-block-2a16d25d51b5803f93cbde8e4dc83b25"><b>这个时候，一切都完美刷新了！</b></div><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-2a16d25d51b58070ae40c6b2964fddf6" data-id="2a16d25d51b58070ae40c6b2964fddf6"><span><div id="2a16d25d51b58070ae40c6b2964fddf6" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2a16d25d51b58070ae40c6b2964fddf6" title="重要注意事项与建议"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>重要注意事项与建议</b></span></span></h4><ul class="notion-list notion-list-disc notion-block-2a16d25d51b580b1ac24cb73c59e65a4"><li><b>相对位置不变</b>：此方法的前提是，您的<code class="notion-inline-code">汇总分析.xlsx</code>和所有工作簿.xlsx数据源文件，必须始终保持在<b>同一个文件夹</b>内，作为一个整体进行移动和分享。</li></ul><ul class="notion-list notion-list-disc notion-block-2a16d25d51b580339bc2c7923f617502"><li><b>文件名依赖</b>：如果您重命名了某个数据源文件（例如，工作簿1.xlsx改成了第一季度.xlsx），您必须回到配置工作表中，手动更新对应的M函数公式，否则刷新会失败。</li></ul><ul class="notion-list notion-list-disc notion-block-2a16d25d51b580c9b249ecb6c219414f"><li><b>给用户的建议</b>：</li><ul class="notion-list notion-list-disc notion-block-2a16d25d51b580c9b249ecb6c219414f"><li><b>如果您的文件位置是固定的</b>，完全可以使用第一部分的基础方法，因为它最简单直接。</li><li><b>如果您需要频繁移动、分享文件，或者构建一个需要长期维护的报告</b>，那么强烈建议您花时间学习并使用第二部分的动态路径方法，它将为您节省大量后期维护的时间和精力。</li></ul></ul><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-2a06d25d51b580a1a6f4fc84b634ecd0" data-id="2a06d25d51b580a1a6f4fc84b634ecd0"><span><div id="2a06d25d51b580a1a6f4fc84b634ecd0" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2a06d25d51b580a1a6f4fc84b634ecd0" title="三、同一文件夹下的所有文件 - 这是最强大的用法！"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>三、同一文件夹下的所有文件 - 这是最强大的用法！</b></span></span></h3><div class="notion-text notion-block-2a16d25d51b580998288fbc4148df322">接着上面汇总不同工作簿下的工作表，本文将带你继续深入学习Power Query中最强大的功能之一——<b>从文件夹合并</b>，并为你揭开两个“骨灰级”玩家必备的技巧：</div><div class="notion-text notion-block-2a16d25d51b580b39517c3969d2333e8"><b>动态路径</b>和<b>动态列</b>。</div><div class="notion-text notion-block-2a16d25d51b5802cafa5f47162448aea">助你构建一个真正“打不死、移不走、喂不饱”的、可移植、可扩展的自动化数据汇总报告。以下为视频指引：</div><figure class="notion-asset-wrapper notion-asset-wrapper-embed notion-block-2a86d25d51b580909053ef183d6c660e"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:320px"><iframe class="notion-asset-object-fit" src="https://player.bilibili.com/player.html?isOutside=true&amp;aid=115492425637249&amp;bvid=BV12D17B3Er5&amp;cid=33699726418&amp;p=1&amp;spaceId=e4254d42-b947-47ab-a59f-847895c5d80f" title="iframe embed" frameBorder="0" allowfullscreen="" loading="lazy" scrolling="auto"></iframe></div></figure><hr class="notion-hr notion-block-2a16d25d51b580b0a8fdc76523151b44"/><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-2a16d25d51b580cbaf6ac60d795f3461" data-id="2a16d25d51b580cbaf6ac60d795f3461"><span><div id="2a16d25d51b580cbaf6ac60d795f3461" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2a16d25d51b580cbaf6ac60d795f3461" title="场景设定：汇总月度销售报告"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>场景设定：汇总月度销售报告</b></span></span></h4><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-2a16d25d51b58083b507fe6e85a6ab87"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:457px;max-width:100%;flex-direction:column"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3A45bd9046-09eb-415b-8a72-98d606417fe3%3Aimage.png?table=block&amp;id=2a16d25d-51b5-8083-b507-fe6e85a6ab87&amp;t=2a16d25d-51b5-8083-b507-fe6e85a6ab87" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-text notion-block-2a16d25d51b5808d8636cb2e8974b051">假设我们有一个名为<code class="notion-inline-code">月度销售报告</code>的文件夹，里面存放着多个月份的销售Excel文件。我们的任务是，在一个单独的<code class="notion-inline-code">总部分析报告.xlsx</code>文件中，将这个文件夹里所有的销售数据自动汇总起来。</div><div class="notion-text notion-block-2a16d25d51b58055a01ce23168abc35a">这些源文件充满了“陷阱”：</div><ul class="notion-list notion-list-disc notion-block-2a16d25d51b580e38f4fe726cd20ac9e"><li>文件名和内部工作表名各不相同。</li></ul><ul class="notion-list notion-list-disc notion-block-2a16d25d51b5803981b7ec3ec807d884"><li>不同文件的列名、列数不完全统一。</li></ul><div class="notion-text notion-block-2a16d25d51b5806a9b4ed8ebbad9f230">我们的目标是构建一个能<b>无视这些混乱</b>，并能在未来<b>自动包含新增文件和新增列</b>的自动化流程。</div><hr class="notion-hr notion-block-2a16d25d51b58070bb3ef211fd078831"/><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-2a16d25d51b58015a24bf5ce535f3435" data-id="2a16d25d51b58015a24bf5ce535f3435"><span><div id="2a16d25d51b58015a24bf5ce535f3435" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2a16d25d51b58015a24bf5ce535f3435" title="第一部分：基础搭建 — 从文件夹连接"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>第一部分：基础搭建 — 从文件夹连接</b></span></span></h4><div class="notion-text notion-block-2a16d25d51b58057afdeed51395f5e0c">首先，我们在<code class="notion-inline-code">总部分析报告.xlsx</code>中，通过数据 -&gt; 获取数据 -&gt; 从文件 -&gt; 从文件夹 -&gt; 转换数据，连接到月度销售报告文件夹。</div><div class="notion-text notion-block-2a16d25d51b58010891ed1f072eb8046">进入Power Query编辑器后，你会看到一个列出了文件夹内所有文件信息的元数据表。</div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-2a16d25d51b58082a360d20ea90f53ac"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3A7661f358-1b6d-4b79-ad7c-f01bd2b6607e%3Aimage.png?table=block&amp;id=2a16d25d-51b5-8082-a360-d20ea90f53ac&amp;t=2a16d25d-51b5-8082-a360-d20ea90f53ac" alt="notion image" loading="lazy" decoding="async"/></div></figure><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-2a16d25d51b58085bb33cc862486012b" data-id="2a16d25d51b58085bb33cc862486012b"><span><div id="2a16d25d51b58085bb33cc862486012b" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2a16d25d51b58085bb33cc862486012b" title="痛点一：如何排除“自己”，避免循环引用？"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>痛点一：如何排除“自己”，避免循环引用？</b></span></span></h4><div class="notion-text notion-block-2a16d25d51b5800993b0cf7df98b45ae">你会发现，列表里也包含了我们正在操作的<code class="notion-inline-code">总部分析报告.xlsx</code>。如果直接合并，下一次刷新时，它就会把自己上次的结果也当作源数据合并进来，导致数据无限循环。</div><div class="notion-text notion-block-2a16d25d51b58039897fdc9f1e790bfb"><b>✅ 解决方案：筛选行</b></div><div class="notion-text notion-block-2a16d25d51b580cb8af7d04db6d05dda">在合并之前，必须先排除掉非数据文件。</div><ol start="1" class="notion-list notion-list-numbered notion-block-2a16d25d51b580728a16c8660fdb4001" style="list-style-type:decimal"><li>在<code class="notion-inline-code">Name</code>列的筛选器中，取消勾选你的汇总文件名（<code class="notion-inline-code">总部分析报告.xlsx</code>）。</li></ol><ol start="2" class="notion-list notion-list-numbered notion-block-2a16d25d51b580fbbc01f7d567c4298c" style="list-style-type:decimal"><li><b>（</b><code class="notion-inline-code"><b>最佳实践</b></code><b>）</b> 使用文本筛选器，只保留文件名中包含特定关键词（如“销售”）或特定扩展名（如.xlsx）的文件。</li></ol><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-2a16d25d51b58072b7a0ede79569f4ce"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3A8e1d3535-c640-4d88-94f4-f7b06146df5a%3Aimage.png?table=block&amp;id=2a16d25d-51b5-8072-b7a0-ede79569f4ce&amp;t=2a16d25d-51b5-8072-b7a0-ede79569f4ce" alt="notion image" loading="lazy" decoding="async"/></div></figure><hr class="notion-hr notion-block-2a16d25d51b580718d36e39fcda7b83d"/><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-2a16d25d51b5804dbcb5d33bd997c21e" data-id="2a16d25d51b5804dbcb5d33bd997c21e"><span><div id="2a16d25d51b5804dbcb5d33bd997c21e" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2a16d25d51b5804dbcb5d33bd997c21e" title="第二部分：核心技巧一 — 解包并动态展开列"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>第二部分：核心技巧一 — 解包并动态展开列</b></span></span></h4><div class="notion-text notion-block-2a16d25d51b58094b11af2428f399c11">现在，我们需要“解开”每一个Excel文件，并将里面的数据合并。</div><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-2a16d25d51b580abadf9d06438c3c1c5" data-id="2a16d25d51b580abadf9d06438c3c1c5"><span><div id="2a16d25d51b580abadf9d06438c3c1c5" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2a16d25d51b580abadf9d06438c3c1c5" title="步骤1：解包Excel文件"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>步骤1：解包Excel文件</b></span></span></h4><div class="notion-text notion-block-2a16d25d51b5805792aaf2cdf7ea4394">只保留包含文件二进制内容的[Content]列，然后通过 <b>“添加列” -&gt; “自定义列”</b> 来解包：</div><ul class="notion-list notion-list-disc notion-block-2a16d25d51b580389a17e46669f0fe56"><li><b>新列名</b>：例如 UnpackedData</li></ul><ul class="notion-list notion-list-disc notion-block-2a16d25d51b5801c9b10da40492f151f"><li><b>自定义列公式</b>：</li><ul class="notion-list notion-list-disc notion-block-2a16d25d51b5801c9b10da40492f151f"><div class="notion-text notion-block-2a16d25d51b580dea41eedef45aead9d"><code class="notion-inline-code">= Excel.Workbook([Content], </code><code class="notion-inline-code"><b>true</b></code><code class="notion-inline-code">)</code></div><li><b>代码解读</b>：Excel.Workbook()函数读取每个文件的二进制内容([Content])，并返回一个包含其内部所有工作表和表格信息的元数据表。第二个参数true，表示让Power Query尝试自动提升每个工作表的标题行。</li></ul></ul><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-2a16d25d51b580d38ca8fe232c3c6407"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3Ae9502aa7-ec3b-4df3-9140-6a0d69354666%3Aimage.png?table=block&amp;id=2a16d25d-51b5-80d3-8ca8-fe232c3c6407&amp;t=2a16d25d-51b5-80d3-8ca8-fe232c3c6407" alt="notion image" loading="lazy" decoding="async"/></div></figure><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-2a16d25d51b58006b0e6e414923e6a5c" data-id="2a16d25d51b58006b0e6e414923e6a5c"><span><div id="2a16d25d51b58006b0e6e414923e6a5c" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2a16d25d51b58006b0e6e414923e6a5c" title="痛点二：新增的列，为什么刷新不出来？"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>痛点二：新增的列，为什么刷新不出来？</b></span></span></h4><div class="notion-text notion-block-2a16d25d51b580a2902bdc0f24c5f7b6">现在，展开新创建的<code class="notion-inline-code">UnpackedData列</code>，你会得到以下：</div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-2a16d25d51b58000a79fe3f753624099"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3A2eee8132-e71c-4277-898a-9b8a1d278cc5%3Aimage.png?table=block&amp;id=2a16d25d-51b5-8000-a79f-e3f753624099&amp;t=2a16d25d-51b5-8000-a79f-e3f753624099" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-text notion-block-2a16d25d51b580f8be74c8895fe82db3">保留Table列即可，以下操作就和 第一种情况：同一工作簿下的多个工作表的追加查询一样的操作了，要解决2个问题：一个是<b>动态获取所有列名，一个是获取用不迷路的动态路径。</b></div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-2a16d25d51b580198fa4dc0892d6c9af"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3Ac089bd8c-a97a-4adf-8cdf-df89df0729ee%3Aimage.png?table=block&amp;id=2a16d25d-51b5-8019-8fa4-dc0892d6c9af&amp;t=2a16d25d-51b5-8019-8fa4-dc0892d6c9af" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-text notion-block-2a16d25d51b580b3a57cdf25e58f55b4">以上是所有工作表合并后的结果。但这里埋着一个巨大的“坑”：这个“展开的data”步骤的M代码，会<b>把当前所有列的名称写死</b>。</div><div class="notion-text notion-block-2a16d25d51b580a9a4afe272f5255373">如果未来你的源文件中增加了新的列（比如“销售成本”），刷新时，由于新列名不在这个写死的列表里，它将被<b>自动忽略</b>！</div><div class="notion-text notion-block-2a16d25d51b580539a23c507feb375f4"><b>✅ 解决方案：动态获取所有列名</b></div><div class="notion-text notion-block-2a16d25d51b58096a685de22398f92d7">我们需要在“展开”<b>之前</b>，先用一段M代码，动态地生成一个包含所有可能列名的“超级列表”。</div><ol start="1" class="notion-list notion-list-numbered notion-block-2a16d25d51b5809f85ccd9d77fa3a93d" style="list-style-type:decimal"><li>选中“解包Excel”那一步（“删除的其他列1”）。</li></ol><ol start="2" class="notion-list notion-list-numbered notion-block-2a16d25d51b580c7a7fad67b5efe56ac" style="list-style-type:decimal"><li>点击公式栏左侧的 <b>fx</b> 按钮，插入一个新步骤。</li></ol><ol start="3" class="notion-list notion-list-numbered notion-block-2a16d25d51b580d6be18dd4f363cfab5" style="list-style-type:decimal"><li>将这个新步骤的公式替换为：</li><ol class="notion-list notion-list-numbered notion-block-2a16d25d51b580d6be18dd4f363cfab5" style="list-style-type:lower-alpha"><div class="notion-text notion-block-2a16d25d51b58080ab3dcda796b7970a"><code class="notion-inline-code">= List.Distinct(List.Combine(List.Transform( 删除的其他列1[Data], each Table.ColumnNames(_))))</code></div><ul class="notion-list notion-list-disc notion-block-2a16d25d51b580d1ba4cf1fc99544301"><li><b>代码解读</b>：这段代码会遍历<code class="notion-inline-code">Data</code>列中的每一个嵌套表，提取出它们各自的列名列表，然后将这些列表合并并去重，最终得到一个包含了所有唯一列名的动态列表。</li></ul></ol></ol><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-2a16d25d51b5804cbf72ef6022b0a317"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3A023ce839-b086-433c-8067-28727eef7a21%3Aimage.png?table=block&amp;id=2a16d25d-51b5-804c-bf72-ef6022b0a317&amp;t=2a16d25d-51b5-804c-bf72-ef6022b0a317" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-text notion-block-2a16d25d51b580039518ddf0a2f5bf9d">将这个步骤重命名为 <code class="notion-inline-code">动态列标题</code>。</div><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-2a16d25d51b580c7b3a5d1d2d978f925" data-id="2a16d25d51b580c7b3a5d1d2d978f925"><span><div id="2a16d25d51b580c7b3a5d1d2d978f925" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2a16d25d51b580c7b3a5d1d2d978f925" title="步骤2：使用动态列表展开"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>步骤2：使用动态列表展开</b></span></span></h4><div class="notion-text notion-block-2a16d25d51b58081b9c2eead124b31c4">现在，回到你原来的<code class="notion-inline-code">“展开的“Data”</code>那一步，修改它的M代码。</div><ul class="notion-list notion-list-disc notion-block-2a16d25d51b5806daa0dc9698dd71b76"><li><b>修改前</b>：</li></ul><div class="notion-text notion-block-2a16d25d51b58057aa67e19fd61c21b6"><code class="notion-inline-code">= Table.ExpandTableColumn(之前的步骤名, &quot;Data&quot;, {&quot;列1&quot;, &quot;列2&quot;, &quot;列3&quot;})</code></div><ul class="notion-list notion-list-disc notion-block-2a16d25d51b580d082d4fa85828ddd49"><li><b>修改后</b>：</li></ul><div class="notion-text notion-block-2a16d25d51b580179b53dea4c9cf795e"><code class="notion-inline-code">= Table.ExpandTableColumn(之前的步骤名, &quot;Data&quot;, 动态列标题)</code></div><div class="notion-text notion-block-2a16d25d51b580adba73d12d6134172b">我们用动态生成的<code class="notion-inline-code">动态列标题</code>列表，替换掉了那个写死的列名列表。现在，你的查询已经具备了“柔性扩展”的能力！</div><hr class="notion-hr notion-block-2a16d25d51b5800ab133d77482083cfd"/><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-2a16d25d51b5802a95dfc35e90144141" data-id="2a16d25d51b5802a95dfc35e90144141"><span><div id="2a16d25d51b5802a95dfc35e90144141" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2a16d25d51b5802a95dfc35e90144141" title="第三部分：核心技巧二 — 构建永不迷路的动态路径"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>第三部分：核心技巧二 — 构建永不迷路的动态路径</b></span></span></h4><div class="notion-text notion-block-2a16d25d51b580868f08d97252c69f1f">我们的查询现在很智能，但它依然很“脆弱”。如果你把整个月度销售报告文件夹移动到新的位置，刷新时就会因为“找不到文件”而报错。</div><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-2a16d25d51b580429da3c73c0bfc6b0c" data-id="2a16d25d51b580429da3c73c0bfc6b0c"><span><div id="2a16d25d51b580429da3c73c0bfc6b0c" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2a16d25d51b580429da3c73c0bfc6b0c" title="痛点三：绝对路径的“诅咒”"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>痛点三：绝对路径的“诅咒”</b></span></span></h4><div class="notion-text notion-block-2a16d25d51b5806ebe9dd0116ea65014">Power Query的“源”步骤默认记录的是<b>绝对路径</b>（如C:\Users\Desktop\月度销售报告）。这个写死的路径，就是查询可移植性的最大障碍。</div><div class="notion-text notion-block-2a16d25d51b580cd846ae88d97a4964d"><b>✅ 解决方案：在Excel中创建“路径信标”，让Power Query动态寻址</b></div><ol start="1" class="notion-list notion-list-numbered notion-block-2a16d25d51b580d1b5b9cb0984f18561" style="list-style-type:decimal"><li><b>在Excel中创建信标</b>：</li><ol class="notion-list notion-list-numbered notion-block-2a16d25d51b580d1b5b9cb0984f18561" style="list-style-type:lower-alpha"><ul class="notion-list notion-list-disc notion-block-2a16d25d51b580aaa109d4e5e4d2dc53"><li>在<code class="notion-inline-code">总部分析报告.xlsx</code>中，新建一个名为<code class="notion-inline-code">配置</code>的工作表。</li></ul><ul class="notion-list notion-list-disc notion-block-2a16d25d51b5801eb089c531bd458045"><li>在A1单元格，输入以下Excel公式，以获取文件夹路径：</li><ul class="notion-list notion-list-disc notion-block-2a16d25d51b5801eb089c531bd458045"><div class="notion-text notion-block-2a16d25d51b580b38d5fda2964b755aa"><code class="notion-inline-code">=</code><code class="notion-inline-code"><b>LEFT</b></code><code class="notion-inline-code">(CELL(&quot;filename&quot;,A1),FIND(&quot;[&quot;,CELL(&quot;filename&quot;,A1))-2)</code></div></ul></ul><ul class="notion-list notion-list-disc notion-block-2a16d25d51b5804fb736c2bfc09fcbf1"><li>选中A1单元格，通过 <b>“公式” -&gt; “定义名称”</b>，将其命名为 <code class="notion-inline-code">汇总文件夹路径</code>。</li></ul></ol></ol><ol start="2" class="notion-list notion-list-numbered notion-block-2a16d25d51b580e2a1b6d2b33bd82299" style="list-style-type:decimal"><li><b>在Power Query中引用信标</b>：</li><ol class="notion-list notion-list-numbered notion-block-2a16d25d51b580e2a1b6d2b33bd82299" style="list-style-type:lower-alpha"><ul class="notion-list notion-list-disc notion-block-2a16d25d51b5805f8808d87f32d3f585"><li>回到Power Query编辑器，选中<b>第一步“源 (Source)”</b>。</li></ul><ul class="notion-list notion-list-disc notion-block-2a16d25d51b5808bbe02ce0005cad704"><li>修改其M代码。</li></ul><ul class="notion-list notion-list-disc notion-block-2a16d25d51b58093a94dc14b02a9d4b1"><li><b>修改前</b>：</li><ul class="notion-list notion-list-disc notion-block-2a16d25d51b58093a94dc14b02a9d4b1"><div class="notion-text notion-block-2a16d25d51b5806ba041fb7fd0abd647"><code class="notion-inline-code">= Folder.Files(&quot;C:\Users\Desktop\月度销售报告&quot;)</code></div></ul></ul><ul class="notion-list notion-list-disc notion-block-2a16d25d51b58042a1dad31a4ccd4162"><li><b>修改后</b>：</li><ul class="notion-list notion-list-disc notion-block-2a16d25d51b58042a1dad31a4ccd4162"><div class="notion-text notion-block-2a16d25d51b58075b6cce45734cf0337"><code class="notion-inline-code">= Folder.Files(Excel.CurrentWorkbook(){[Name=&quot;汇总文件夹路径&quot;]}[Content]{0}[Column1])</code></div></ul></ul><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-2a16d25d51b580dfa0b6e3936506375c"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3Aa146fef1-d75c-4c49-992a-f4d2c4e6e1d7%3Aimage.png?table=block&amp;id=2a16d25d-51b5-80df-a0b6-e3936506375c&amp;t=2a16d25d-51b5-80df-a0b6-e3936506375c" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-text notion-block-2a16d25d51b58052b1a4e75d16b6d604"><div class="notion-text-children"><ul class="notion-list notion-list-disc notion-block-2a16d25d51b580928dd3f51eec5bc16a"><li><b>代码解读</b>：Excel.CurrentWorkbook()函数会在当前工作簿内部查找名叫<code class="notion-inline-code">汇总文件夹路径</code>的对象，并提取其单元格的值（也就是那个动态的文件夹路径），然后将这个路径传递给Folder.Files函数。</li></ul></div></div></ol></ol><hr class="notion-hr notion-block-2a16d25d51b58018a8d8c8d070aa7cd1"/><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-2a16d25d51b580819c56d672316b7dbc" data-id="2a16d25d51b580819c56d672316b7dbc"><span><div id="2a16d25d51b580819c56d672316b7dbc" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2a16d25d51b580819c56d672316b7dbc" title="结论：你的自动化工厂已建成！"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>结论：你的自动化工厂已建成！</b></span></span></h4><div class="notion-text notion-block-2a16d25d51b58021a5a7e9ba46ec82cb">恭喜！通过以上改造，你已经构建了一个真正专业的自动化数据汇总流程。它：</div><ul class="notion-list notion-list-disc notion-block-2a16d25d51b58075a58cfed16c67272f"><li><b>逻辑健壮</b>：能通过筛选，避免循环引用。</li></ul><ul class="notion-list notion-list-disc notion-block-2a16d25d51b580e0918af9f7e2fb09b3"><li><b>结构健壮</b>：能通过动态列，自动适应源数据结构的变化。</li></ul><ul class="notion-list notion-list-disc notion-block-2a16d25d51b580a297c9f59789745629"><li><b>路径健壮</b>：能通过动态路径，实现整个项目的自由移动和分享。</li></ul><div class="notion-text notion-block-2a16d25d51b580a0912aed5dc2f8e662">从现在起，你只需将每月的新报告文件扔进那个文件夹，然后在你的汇总报告中点击一下“刷新”。所有的数据清洗、合并、更新都会在瞬间自动完成。这，就是Power Query的真正威力！瞬间自动完成。这，就是Power Query的真正威力！</div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-29a6d25d51b58179915dc724e13919d7" data-id="29a6d25d51b58179915dc724e13919d7"><span><div id="29a6d25d51b58179915dc724e13919d7" class="notion-header-anchor"></div><a class="notion-hash-link" href="#29a6d25d51b58179915dc724e13919d7" title="如果想深入学习，可以付费￥129，加入我的知识星球，加我的微信，一对一教学。"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">如果想深入学习，可以付费￥129，加入我的知识星球，加我的微信，一对一教学。</span></span></h2><div class="notion-row notion-block-29d6d25d51b580e2b329fa348da9f06a"><div class="notion-column notion-block-29d6d25d51b58089a49cd30977fa7d47" style="width:calc((100% - (1 * min(32px, 4vw))) * 0.5)"><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-29d6d25d51b580e097f4eb35084eb6ac"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3Ac6dfd82b-3034-4896-86f0-86cbc831b432%3A%E6%B5%B7%E6%8A%A5_(2).png?table=block&amp;id=29d6d25d-51b5-80e0-97f4-eb35084eb6ac&amp;t=29d6d25d-51b5-80e0-97f4-eb35084eb6ac" alt="notion image" loading="lazy" decoding="async"/></div></figure></div><div class="notion-spacer"></div><div class="notion-column notion-block-29d6d25d51b58079b3c6d36a9879cfaa" style="width:calc((100% - (1 * min(32px, 4vw))) * 0.5)"><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-29d6d25d51b580b7a305df2fa06c21d8"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:288px;max-width:100%;flex-direction:column"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3A7ccf2db0-330d-49d1-a24b-85d53f0f4c28%3A%E5%BE%AE%E4%BF%A1%E5%9B%BE%E7%89%87_20251031143640_162_147.png?table=block&amp;id=29d6d25d-51b5-80b7-a305-df2fa06c21d8&amp;t=29d6d25d-51b5-80b7-a305-df2fa06c21d8" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-blank notion-block-29d6d25d51b5804db074d9c9cf52c17b"> </div></div><div class="notion-spacer"></div></div><div class="notion-blank notion-block-29a6d25d51b580abb75bf05c9a502927"> </div><div class="notion-blank notion-block-29c6d25d51b5807aa774d875fcba1b08"> </div></main></div>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[EP021：List.Transform遍历转换函数和代码版汇总文件夹下Excel工作簿]]></title>
            <link>https://docs.xiaoweihome.cn/article/EP021</link>
            <guid>https://docs.xiaoweihome.cn/article/EP021</guid>
            <pubDate>Thu, 18 Dec 2025 00:00:00 GMT</pubDate>
            <content:encoded><![CDATA[<div id="notion-article" class="mx-auto overflow-hidden "><main class="notion light-mode notion-page notion-block-2cd6d25d51b580099017f38a2c536774"><div class="notion-viewport"></div><div class="notion-collection-page-properties"></div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-2cd6d25d51b58119ba4fc45764ea3953"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3A97cc2680-d231-4782-b27b-027985188387%3A%E8%80%81%E6%B1%AA%E6%B4%9E%E5%AF%9F_%E5%85%AC%E4%BC%97%E5%8F%B7_%E9%A1%B6%E9%83%A8_GIF.gif?table=block&amp;id=2cd6d25d-51b5-8119-ba4f-c45764ea3953&amp;t=2cd6d25d-51b5-8119-ba4f-c45764ea3953" alt="notion image" loading="lazy" decoding="async"/></div></figure><hr class="notion-hr notion-block-2cd6d25d51b581879e33fe66bc77c996"/><div class="notion-text notion-block-2cd6d25d51b58183ad50ce7157900e82">（阅读需要15分钟左右）</div><div class="notion-text notion-block-2cd6d25d51b580598e09ec6e5f47f99e">这节EP021课，我们继续讲解List函数族的函数，主要讲解 M 语言中一个极其强大且常用的函数：<code class="notion-inline-code">List.Transform</code>。</div><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-2cd6d25d51b5807fbde6f87d5b03e68e" data-id="2cd6d25d51b5807fbde6f87d5b03e68e"><span><div id="2cd6d25d51b5807fbde6f87d5b03e68e" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2cd6d25d51b5807fbde6f87d5b03e68e" title="一、 核心功能：遍历与转换"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>一、 核心功能：遍历与转换</b></span></span></h3><div class="notion-text notion-block-2cd6d25d51b580ec9f13dabeb4548d32"><code class="notion-inline-code">List.Transform</code> 的作用类似于 Excel 里的“批量处理”或者编程中的“循环（Loop）”。</div><ul class="notion-list notion-list-disc notion-block-2cd6d25d51b5803fbe86d629a7014691"><li><b>官方定义</b>：通过将转换函数 <code class="notion-inline-code">transform</code> 应用到列表 <code class="notion-inline-code">list</code> 来返回值的新列表。</li></ul><ul class="notion-list notion-list-disc notion-block-2cd6d25d51b580ad837fc71104e9f8c0"><li><b>通俗理解</b>：把一个列表里的每一个元素（无论是数字、文本，还是表格）都拿出来，按照你设定的规则“加工”一遍，然后把加工好的新元素放回一个新的列表里。</li></ul><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-2cd6d25d51b58059a5fbd1d3469f65fc" data-id="2cd6d25d51b58059a5fbd1d3469f65fc"><span><div id="2cd6d25d51b58059a5fbd1d3469f65fc" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2cd6d25d51b58059a5fbd1d3469f65fc" title="1. 基本语法"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>1. 基本语法</b></span></span></h4><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-2cd6d25d51b580908366fcfd74d7d23c" data-id="2cd6d25d51b580908366fcfd74d7d23c"><span><div id="2cd6d25d51b580908366fcfd74d7d23c" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2cd6d25d51b580908366fcfd74d7d23c" title="2. 简单应用案例"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>2. 简单应用案例</b></span></span></h4><ul class="notion-list notion-list-disc notion-block-2cd6d25d51b5806b809fc0890420571d"><li><b>数字加一</b>：</li><ul class="notion-list notion-list-disc notion-block-2cd6d25d51b5806b809fc0890420571d"><li>代码：<code class="notion-inline-code">List.Transform({7, 8, 9}, each _ + 1)</code></li><li>过程：拿出7 -&gt; 加1得8；拿出8 -&gt; 加1得9；拿出9 -&gt; 加1得10。</li><li>结果：<code class="notion-inline-code">{8, 9, 10}</code></li></ul></ul><ul class="notion-list notion-list-disc notion-block-2cd6d25d51b580bab849e06f11e762a4"><li><b>自定义变量参数写法</b>：</li><ul class="notion-list notion-list-disc notion-block-2cd6d25d51b580bab849e06f11e762a4"><li>代码：<code class="notion-inline-code">List.Transform({7, 8, 9}, (x) =&gt; x + 1)</code></li><li>说明：这与上面的 <code class="notion-inline-code">each _ + 1</code> 效果完全一样，<code class="notion-inline-code">x</code> 只是给当前元素起的一个临时名字（变量名）。</li></ul></ul><ul class="notion-list notion-list-disc notion-block-2cd6d25d51b580eea380f8124ffcb0fe"><li><b>文本连接</b>：</li><ul class="notion-list notion-list-disc notion-block-2cd6d25d51b580eea380f8124ffcb0fe"><li>代码：<code class="notion-inline-code">List.Transform({&quot;周一&quot;, &quot;周二&quot;, &quot;周三&quot;}, each _ &amp; &quot;上班&quot;)</code></li><li>结果：<code class="notion-inline-code">{&quot;周一上班&quot;, &quot;周二上班&quot;,&quot;周三上班&quot;}</code></li></ul></ul><hr class="notion-hr notion-block-2cd6d25d51b58050bda9d6f1aaf4a8c4"/><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-2cd6d25d51b58024bf57f1ed5d60d44b" data-id="2cd6d25d51b58024bf57f1ed5d60d44b"><span><div id="2cd6d25d51b58024bf57f1ed5d60d44b" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2cd6d25d51b58024bf57f1ed5d60d44b" title="二、 实战案例：通过函数代码批量汇总文件夹下Excel工作簿"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>二、 实战案例：通过函数代码批量汇总文件夹下Excel工作簿</b></span></span></h3><div class="notion-text notion-block-2cd6d25d51b58022af97c42538b3a0c3">这是本节课的<b>重头戏</b>，向大家展示并传授 <code class="notion-inline-code">List.Transform</code> 在处理复杂数据结构时的威力。</div><div class="notion-text notion-block-2cd6d25d51b580d787eed13e947bffec"><b>场景</b>：你需要从一个文件夹里读取多个 Excel 文件，每个文件里都有数据，你需要把它们全部合并成一张大表——这就是我们在第一阶段界面操作课EP011里的《<a class="notion-link" href="/29a6d25d51b5805ea156ec7ebba80149">从文件夹追加查询</a>》的函数操作版了，大致的步骤如下。</div><div class="notion-text notion-block-2cd6d25d51b580f39e7fc71ad1b4ef8d"><b>解决步骤（使用高级编辑器编写）：</b></div><ol start="1" class="notion-list notion-list-numbered notion-block-2cd6d25d51b580f9ada8cc543c3769dd" style="list-style-type:decimal"><li><b>获取文件列表</b>：</li><ol class="notion-list notion-list-numbered notion-block-2cd6d25d51b580f9ada8cc543c3769dd" style="list-style-type:lower-alpha"><ul class="notion-list notion-list-disc notion-block-2cd6d25d51b5804c9e6dcbe9c33fac78"><li><code class="notion-inline-code">源 = Folder.Files(&quot;文件夹路径&quot;)</code></li></ul><ul class="notion-list notion-list-disc notion-block-2cd6d25d51b580b78ef3e155c0b3c6fe"><li>此时得到一张表，其中 <code class="notion-inline-code">[Content]</code> 列包含了所有文件的二进制内容。</li></ul></ol></ol><ol start="2" class="notion-list notion-list-numbered notion-block-2cd6d25d51b580c19bcbd3aa45c0042d" style="list-style-type:decimal"><li><b>提取 Content 列</b>：</li><ol class="notion-list notion-list-numbered notion-block-2cd6d25d51b580c19bcbd3aa45c0042d" style="list-style-type:lower-alpha"><ul class="notion-list notion-list-disc notion-block-2cd6d25d51b580309084fa1926b2bf40"><li><code class="notion-inline-code">源[Content]</code></li></ul><ul class="notion-list notion-list-disc notion-block-2cd6d25d51b580c4bc58c9746e7235d1"><li>这步操作把 <code class="notion-inline-code">[Content]</code> 列变成了一个 <b>列表 (List)</b>，里面是一个个 Binary 文件。</li></ul></ol></ol><ol start="3" class="notion-list notion-list-numbered notion-block-2cd6d25d51b580098d1fdc84535e82d5" style="list-style-type:decimal"><li><b>遍历转换（核心步骤）</b>：</li><ol class="notion-list notion-list-numbered notion-block-2cd6d25d51b580098d1fdc84535e82d5" style="list-style-type:lower-alpha"><ul class="notion-list notion-list-disc notion-block-2cd6d25d51b5804a8237c3b0d422c9f8"><li><b>目标</b>：把 Binary 文件变成 Excel 的 Table。</li></ul><ul class="notion-list notion-list-disc notion-block-2cd6d25d51b580cea1cfd298312ddf6a"><li><b>代码</b>：</li><ul class="notion-list notion-list-disc notion-block-2cd6d25d51b580cea1cfd298312ddf6a"></ul></ul><ul class="notion-list notion-list-disc notion-block-2cd6d25d51b580bab660fe699c39614d"><li><b>结果</b>：现在列表里的元素不再是 Binary，而是一个个包含 Sheet 信息的 <b>Table</b>。</li></ul></ol></ol><ol start="4" class="notion-list notion-list-numbered notion-block-2cd6d25d51b580548003e9085faea06c" style="list-style-type:decimal"><li><b>二次遍历与钻取（深化）</b>：</li><ol class="notion-list notion-list-numbered notion-block-2cd6d25d51b580548003e9085faea06c" style="list-style-type:lower-alpha"><ul class="notion-list notion-list-disc notion-block-2cd6d25d51b5809cbe32f19d09e96bf0"><li>上一步得到的 Table 里，我们通常只需要第一个 Sheet 的数据（位于 <code class="notion-inline-code">Data</code> 列的第 0 行）。</li></ul><ul class="notion-list notion-list-disc notion-block-2cd6d25d51b5809bb145eca1d41cabd6"><li><b>代码优化</b>：</li><ul class="notion-list notion-list-disc notion-block-2cd6d25d51b5809bb145eca1d41cabd6"></ul></ul><ul class="notion-list notion-list-disc notion-block-2cd6d25d51b580c1b73ee50dcef8576d"><li><b>结果</b>：现在列表里的元素，就是我们真正需要的<b>数据表 (Table)</b> 了。</li></ul></ol></ol><ol start="5" class="notion-list notion-list-numbered notion-block-2cd6d25d51b58010ae9cfff773481f03" style="list-style-type:decimal"><li><b>合并列表</b>：</li><ol class="notion-list notion-list-numbered notion-block-2cd6d25d51b58010ae9cfff773481f03" style="list-style-type:lower-alpha"><ul class="notion-list notion-list-disc notion-block-2cd6d25d51b580aeb079dd13b518ae3b"><li>最后，我们需要把这个包含多个 Table 的列表，合并成一张大表。</li></ul><ul class="notion-list notion-list-disc notion-block-2cd6d25d51b58053bce7d106f6025533"><li><b>代码</b>：<code class="notion-inline-code">Table.Combine(上一步的列表)</code></li></ul></ol></ol><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-2cd6d25d51b580048c01d7749e07b1de" data-id="2cd6d25d51b580048c01d7749e07b1de"><span><div id="2cd6d25d51b580048c01d7749e07b1de" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2cd6d25d51b580048c01d7749e07b1de" title="下面就以EP011：《讲透追加查询以及初识M函数（汇总同一文件夹下多个工作簿）》的例子来复用讲解一下。"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>下面就以EP011：《</b><b><a class="notion-link" href="/29a6d25d51b5805ea156ec7ebba80149">讲透追加查询以及初识M函数（汇总同一文件夹下多个工作簿）</a></b><b>》的例子来复用讲解一下。</b></span></span></h4><div class="notion-text notion-block-2cd6d25d51b580f79711fc4b63e61b33">首先，我们回到EP011那一节课教案的“删除的其他列”这一步。</div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-2cd6d25d51b5806e9f1ff69c499da99f"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3A4f5b2d6f-b59f-4e7e-ae72-81495bf0f077%3Aimage.png?table=block&amp;id=2cd6d25d-51b5-806e-9f1f-f69c499da99f&amp;t=2cd6d25d-51b5-806e-9f1f-f69c499da99f" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-blank notion-block-2cd6d25d51b580b8a42deb56c17c99bc"> </div><div class="notion-text notion-block-2cd6d25d51b5808ca7a0eb11430c87a2">当前这一步的状态是：已经出现一个 <b>Table（表）</b>，但表里只有一列 <b>Content</b>（装满二进制文件的列）如上图所示。</div><div class="notion-text notion-block-2cd6d25d51b580af90d6f96d34080d09">我们的目标是：<b>不动用鼠标点那个“合并文件”按钮，完全用 M 函数 </b><code class="notion-inline-code"><b>List.Transform</b></code><b> 把它们变成一张大表。</b></div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-2cd6d25d51b58030a6a6d872b7556635"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:480px;max-width:100%;flex-direction:column"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3A75fc160b-b016-45c5-818d-25d7d5b1d7a5%3Aimage.png?table=block&amp;id=2cd6d25d-51b5-8030-a6a6-d872b7556635&amp;t=2cd6d25d-51b5-8030-a6a6-d872b7556635" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-text notion-block-2cd6d25d51b5802fbf74fe17f7e4d1a9">请点击 <b>【高级编辑器】</b>，可以用<b>三行代码</b>（对应逻辑上的三步）接管后续的操作。</div><hr class="notion-hr notion-block-2cd6d25d51b5804595f3fc95461c1fe9"/><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-2cd6d25d51b5801596dbf013f4b3b7b5" data-id="2cd6d25d51b5801596dbf013f4b3b7b5"><span><div id="2cd6d25d51b5801596dbf013f4b3b7b5" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2cd6d25d51b5801596dbf013f4b3b7b5" title="操作步骤"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>操作步骤</b></span></span></h4><div class="notion-text notion-block-2cd6d25d51b580069585fd58942b0316">在高级编辑器中，请在 <code class="notion-inline-code">#&quot;删除的其他列&quot;</code> 这一行后面加个逗号，然后粘贴以下三步代码（注意：我把逻辑拆得很细，方便你理解：</div><div class="notion-text notion-block-2cd6d25d51b580259346e80f3c66a799"><b>最后别忘了修改 </b><code class="notion-inline-code"><b>in</b></code><b>：</b></div><div class="notion-text notion-block-2cd6d25d51b580c597dff1211189f39d">结果，与EP011课所讲的方法差5行。</div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-2cd6d25d51b580f49d2afb2df062c646"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3A306e38ea-dbcf-4e7e-97e0-ddc078ab4178%3Aimage.png?table=block&amp;id=2cd6d25d-51b5-80f4-9d2a-fb2df062c646&amp;t=2cd6d25d-51b5-80f4-9d2a-fb2df062c646" alt="notion image" loading="lazy" decoding="async"/></div></figure><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-2cd6d25d51b58058bb6bc7640006a700" data-id="2cd6d25d51b58058bb6bc7640006a700"><span><div id="2cd6d25d51b58058bb6bc7640006a700" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2cd6d25d51b58058bb6bc7640006a700" title="原因："><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">原因：</span></span></h4><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-2cd6d25d51b58025a81ff330ede1a85c" data-id="2cd6d25d51b58025a81ff330ede1a85c"><span><div id="2cd6d25d51b58025a81ff330ede1a85c" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2cd6d25d51b58025a81ff330ede1a85c" title="⚔️ 两种方法的逻辑差异"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">⚔️ 两种方法的逻辑差异</span></span></h4><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-2cd6d25d51b580e2babdf45adcaae2de" data-id="2cd6d25d51b580e2babdf45adcaae2de"><span><div id="2cd6d25d51b580e2babdf45adcaae2de" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2cd6d25d51b580e2babdf45adcaae2de" title="EP021方法：代码流（行数变少的那个）"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>EP021方法：代码流（行数变少的那个）</b></span></span></h4><div class="notion-text notion-block-2cd6d25d51b58085bbfff05ac663edd1">在于遍历转换步骤中的这个代码：<code class="notion-inline-code"> Excel.Workbook(_, true){0}[Data] </code></div><ul class="notion-list notion-list-disc notion-block-2cd6d25d51b580a1a355d2f0a600abbf"><li><b>逻辑</b>：它不管文件里有几个 Sheet，它<b>只抓取排在第 1 位的那一个 ({0})</b>。</li></ul><ul class="notion-list notion-list-disc notion-block-2cd6d25d51b5808b8b84cb83ffa3d958"><li><b>结果</b>：它抓了 Sheet1（有数据），无视了 Sheet2 和 Sheet3。所以数据是干净的 9 行。</li></ul><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-2cd6d25d51b580a6b180e05318738891" data-id="2cd6d25d51b580a6b180e05318738891"><span><div id="2cd6d25d51b580a6b180e05318738891" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2cd6d25d51b580a6b180e05318738891" title="EP011方法：手动流（行数更多的那个）"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>EP011方法：手动流（行数更多的那个）</b></span></span></h4><div class="notion-text notion-block-2cd6d25d51b580b1b677c9a32cb98a67">操作：你点击了“展开”按钮。</div><ul class="notion-list notion-list-disc notion-block-2cd6d25d51b58016adfedadc3a0128d6"><li><b>逻辑</b>：它把文件里<b>所有的 Sheet</b> 都展出来了！</li></ul><ul class="notion-list notion-list-disc notion-block-2cd6d25d51b580c7b1cce9639740a966"><li><b>结果</b>：</li><ul class="notion-list notion-list-disc notion-block-2cd6d25d51b580c7b1cce9639740a966"><li>它读取了 Sheet1（正常数据）。</li><li>它也读取了 Sheet2（可能是个空表，导致全是 null）。</li><li>它还读取了 Sheet3（可能里面哪怕只有一个单元格有内容，比如那个落单的 P-102，也会被读进来）。</li></ul></ul><div class="notion-text notion-block-2cd6d25d51b58064b8f2e0c7c0306f6f">因为，我的源文件里确实存在，一个工作簿下，不仅仅只有一个工作表需要合并的情况，而是有多个工作表的情况，那要如何修改代码呢？以下就是修改后的完整函数：</div><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-2cd6d25d51b580bd9371df827d257472" data-id="2cd6d25d51b580bd9371df827d257472"><span><div id="2cd6d25d51b580bd9371df827d257472" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2cd6d25d51b580bd9371df827d257472" title="💡 关键细节解读"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">💡 关键细节解读</span></span></h4><div class="notion-text notion-block-2cd6d25d51b5803fb840d7843933c837">我在代码里偷偷加了一个<code class="notion-inline-code"> </code><code class="notion-inline-code"><b>Table.SelectRows(..., each [Kind]=&quot;Sheet&quot;)</b></code><code class="notion-inline-code">。</code></div><div class="notion-text notion-block-2cd6d25d51b58059844ac0e2eb5f2f96"><b>为什么要加这个？</b></div><div class="notion-text notion-block-2cd6d25d51b5805e80e6c5b4eae05da7">这又是<b>“排雷”</b>！Excel文件里除了 Sheet（工作表），有时候还会有<code class="notion-inline-code"> DefinedName（定义名称）</code>或者<code class="notion-inline-code"> Table（超级表）</code>。如果不加这个筛选，Power Query 可能会把同一份数据重复读两遍（一遍读Sheet，一遍读Print_Area）。加上这个筛选，确保 <b>“我只读工作表”</b>，数据不重复、不报错。</div><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-2cd6d25d51b5808da85fd3d216ced914" data-id="2cd6d25d51b5808da85fd3d216ced914"><span><div id="2cd6d25d51b5808da85fd3d216ced914" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2cd6d25d51b5808da85fd3d216ced914" title="⚠️ 一个潜在的副作用（Sheet名名称丢失）"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">⚠️ 一个潜在的副作用（Sheet名名称丢失）</span></span></h3><div class="notion-text notion-block-2cd6d25d51b5809ba287c858b4607185">这种“代码流”写法虽然极其简洁，但有一个缺点：<b>它只提取了数据（Data），丢掉了 Sheet 的名字（Name），如果你的表明有隐藏的信息，比如区域、月份或者其他标识，那么通过这种方法就丢失了，就得使用EP011的手动展开法，那个是可以选择保留的。</b></div><ul class="notion-list notion-list-disc notion-block-2cd6d25d51b580a5bb07dfeb63998dfe"><li>如果你的数据表里本身有“区域”列，那没问题。</li></ul><ul class="notion-list notion-list-disc notion-block-2cd6d25d51b5803499e0c75a139b2c7b"><li>如果你的数据表里没有“区域”列，而你是靠 Sheet 名（如“华东”、“华北”）来区分区域的，那么<b>这种写法会导致你分不清哪行数据属于哪个区域</b>。</li></ul><div class="notion-text notion-block-2cd6d25d51b580c88094da69dcedaa1c"><b>如果你需要保留 Sheet 名</b>，代码会稍微复杂一点（需要保留 Table 结构再展开）。这里就不过多展开写“保留Sheet名版”的代码了。如果不需要Sheet名，上面的代码就是<b>最高效</b>的方案！在真实的财务/商业 BI 项目中，90% 的情况我们都需要保留<b>数据来源（Source Name）</b>。</div><ul class="notion-list notion-list-disc notion-block-2cd6d25d51b58011a2b2e77ffe61c8e1"><li>如果是<code class="notion-inline-code"> Table.Combine </code>，想要保留文件名，如上面所说，必须在<code class="notion-inline-code"> List.Transform </code>里写更复杂的嵌套函数（把文件名塞进内层表）。</li></ul><ul class="notion-list notion-list-disc notion-block-2cd6d25d51b580858436e7a34ea233fc"><li>而EP011的 <b>“展开法”</b>，天然就保留了文件名。</li></ul><div class="notion-text notion-block-2cd6d25d51b580cc8440fe7670aebf0c"><b>目前行业内的现状是：</b></div><ol start="1" class="notion-list notion-list-numbered notion-block-2cd6d25d51b580a6bc96e3a8b99f05ae" style="list-style-type:decimal"><li><b>做快速一次性分析</b>：用EP021的<code class="notion-inline-code"> Table.Combine </code>，快准狠。</li></ol><ol start="2" class="notion-list notion-list-numbered notion-block-2cd6d25d51b58036b512cd84c9b39928" style="list-style-type:decimal"><li><b>做长期自动化报表</b>：用EP011的<b>“动态展开法”</b>。因为只有保留了文件名，数据才是可追溯、可审计的。</li></ol><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-2cd6d25d51b58010b248f9992f15c19c" data-id="2cd6d25d51b58010b248f9992f15c19c"><span><div id="2cd6d25d51b58010b248f9992f15c19c" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2cd6d25d51b58010b248f9992f15c19c" title="自动剪除空白行问题"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">自动剪除空白行问题</span></span></h3><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-2cd6d25d51b5806cbf79c6540581d9dc"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3A070d31be-0023-49e8-b744-c402dca4e9f6%3Aimage.png?table=block&amp;id=2cd6d25d-51b5-806c-bf79-c6540581d9dc&amp;t=2cd6d25d-51b5-806c-bf79-c6540581d9dc" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-text notion-block-2cd6d25d51b580d68e33f19f31797a77">如上图，经过这样修改函数之后的结果变成11行，与我原来手动展开的14行仍然差了3行，我查了下那三行是空白行，也就是说EP021新方法这三个空白行被直接排除了。为什么呢？</div><div class="notion-text notion-block-2cd6d25d51b580f793d1e27a6cbe16f8">在使用新方法（代码版），当你写下这句代码时：</div><div class="notion-text notion-block-2cd6d25d51b580d39c61f35b0edd1b91"><code class="notion-inline-code">each Table.SelectRows(Excel.Workbook(_, true), each [Kind]=&quot;Sheet&quot;)[Data]</code></div><div class="notion-text notion-block-2cd6d25d51b5808fb9a9c31c4a4308d7">Power Query 在后台做了这几件事：</div><ol start="1" class="notion-list notion-list-numbered notion-block-2cd6d25d51b580da92accc24fe169e71" style="list-style-type:decimal"><li><b>打开文件</b>：读取 Excel 文件。</li></ol><ol start="2" class="notion-list notion-list-numbered notion-block-2cd6d25d51b58030a40ee95fb7ba7d96" style="list-style-type:decimal"><li><b>解析 Sheet</b>：它去查看每个 Sheet 的<code class="notion-inline-code"> </code><code class="notion-inline-code"><b>UsedRange（已使用区域）</b></code>。</li></ol><ol start="3" class="notion-list notion-list-numbered notion-block-2cd6d25d51b5802ea9beca4bd6ff4183" style="list-style-type:decimal"><li><b>提升标题 (true)</b>：</li><ol class="notion-list notion-list-numbered notion-block-2cd6d25d51b5802ea9beca4bd6ff4183" style="list-style-type:lower-alpha"><ul class="notion-list notion-list-disc notion-block-2cd6d25d51b5806e92d3ca1de3e835b2"><li>关键点来了！当 PQ 试图“提升第一行作为标题”时，它会触发一个 <b>自动修剪（Auto-Trim）</b> 机制。</li></ul><ul class="notion-list notion-list-disc notion-block-2cd6d25d51b58058a35ad4aa51414594"><li>它会认为：“既然第一行是标题，那么<b>标题下方</b>如果没有数据，或者全是空行，那这些空行肯定不是‘表格’的一部分。”</li></ul><ul class="notion-list notion-list-disc notion-block-2cd6d25d51b5800d9d98edbb4d8029f4"><li><b>结果</b>：它在读取阶段，就直接把 Sheet 末尾那些无意义的空行给 <b>“切”</b> 掉了。它只把“有效数据矩形”交给了你。</li></ul></ol></ol><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-2cd6d25d51b5806baf29dd2444606dd3"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3A93b7812d-a04f-42ca-bc8e-6431066b38ff%3Aimage.png?table=block&amp;id=2cd6d25d-51b5-806b-af29-dd2444606dd3&amp;t=2cd6d25d-51b5-806b-af29-dd2444606dd3" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-text notion-block-2cd6d25d51b580e2a9bff30cea187c4c"><b>结论</b>：在代码版里，那些空行根本就没机会进入你的<code class="notion-inline-code"> [Data] </code>列表，它们在门口就被拦截了。而当你使用手动 UI 操作（点击 Data 旁边的展开按钮）时，Power Query的UI逻辑为了保证预览的完整性，UI 的默认行为往往是 “宁可错杀，不可放过”。读取 Sheet时它虽然也可能提升了标题，但 UI 生成的步骤（通常是<code class="notion-inline-code"> Table.ExpandTableColumn </code>）在处理某些边缘情况（比如 Sheet 里残留了格式但没内容的行）时，判定标准比函数直接调用要宽松，从而把空行也保留了下来。</div><div class="notion-text notion-block-2cd6d25d51b580e79778ef0fa1b22a3e">那3行消失的空白行，本来就是数据里的“噪音”。</div><ul class="notion-list notion-list-disc notion-block-2cd6d25d51b580359126cc0466c149cc"><li>如果你的目的是做销售分析，那3行全空的<code class="notion-inline-code">null</code>对你毫无价值，甚至会干扰计数和求和。</li></ul><ul class="notion-list notion-list-disc notion-block-2cd6d25d51b5808f9d82e219e155f310"><li>新代码不仅帮你合并了数据，还免费赠送了你一次 <b>“除噪服务”</b>。</li></ul><div class="notion-text notion-block-2cd6d25d51b5800ab10ee29b7dfa8e06">所以，这11行的结果才是高质量的数据。</div><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-2cd6d25d51b58016834ccf821a40473c" data-id="2cd6d25d51b58016834ccf821a40473c"><span><div id="2cd6d25d51b58016834ccf821a40473c" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2cd6d25d51b58016834ccf821a40473c" title="关于动态列表题的问题"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">关于动态列表题的问题</span></span></h3><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-2cd6d25d51b580c6bb7ed50d851b1280"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3A7f1d4857-fdd9-424d-8a6c-5bc48d78e6e7%3Aimage.png?table=block&amp;id=2cd6d25d-51b5-80c6-bb7e-d50d851b1280&amp;t=2cd6d25d-51b5-80c6-bb7e-d50d851b1280" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-text notion-block-2cd6d25d51b5802a9f1bf198d5c278f1">还记不记得，在EP011那节课里，通过从文件夹合并的时候，我们在在展开data这一步之前加了一个获取动态列标题的步骤？步骤函数代码如下：</div><div class="notion-text notion-block-2cd6d25d51b58067a4cde5584bce1972">这样做是为了防止，在被合并的Excel文件工作表里面，如果有人添加了新的列标题信息之后，合并表取不到新列的信息，而EP021这节课讲的<code class="notion-inline-code"> Table.Combine </code>用法，<b>新加一列，</b><code class="notion-inline-code"><b> Table.Combine </b></code><b>能抓到吗？</b></div><div class="notion-text notion-block-2cd6d25d51b5804d8c1edf24b6dd3deb"><b>答案是：不会漏。因为</b><code class="notion-inline-code"><b>Table.Combine</b></code><b>的机制是“全集并集”</b>。</div><ul class="notion-list notion-list-disc notion-block-2cd6d25d51b5806788c3e466d74abd51"><li>如果表 A 有 [姓名, 年龄]</li></ul><ul class="notion-list notion-list-disc notion-block-2cd6d25d51b5806882dec76bd89667f7"><li>如果表 B 有 [姓名, 年龄, 手机号] (新增了列)</li></ul><ul class="notion-list notion-list-disc notion-block-2cd6d25d51b5801f9060dcc11cecde8f"><li>Table.Combine({表A, 表B}) 的结果会自动变成 [姓名, 年龄, 手机号]。它会自动对齐，缺的地方填 null。</li></ul><div class="notion-text notion-block-2cd6d25d51b5803e946ff0f7ee7d2851"><b>所以，在“动态获取新列”这一点上，EP021讲的代码法和EP011的动态标题法，打成平手，</b>它们都是动态的。</div><div class="notion-blank notion-block-2cd6d25d51b581af87ccd7fc2cf80c6c"> </div><hr class="notion-hr notion-block-2cd6d25d51b58138bb9ed1a08dccce3f"/><blockquote class="notion-quote notion-block-2cd6d25d51b581e9b073ca657c449daa"><div>【扫码识别下发二维码，获取本文使用到的及历史以来提及、发布的相关精选和原创资料，和我们一起充电，加入后可<b>享受每月6次免费咨询提问，帮助解决您的特定问题</b>！】</div></blockquote><hr class="notion-hr notion-block-2cd6d25d51b5816398c2eaf92375a32c"/><div class="notion-text notion-block-2cd6d25d51b5813fa4d4e06146fc65c2">如果本篇文章对您有帮助或启发，请帮我们<span class="notion-red"><code class="notion-inline-code">点赞、转发、推荐、关注</code></span>，让更多想转型财务BP、锻造<span class="notion-red"><code class="notion-inline-code">数据分析和可视化洞察能力</code></span>的财务同行们看到，关注<code class="notion-inline-code">【老汪洞察】</code>，不迷路！</div><div class="notion-row notion-block-2cd6d25d51b581fda7fbfe88122cc62f"><div class="notion-column notion-block-2cd6d25d51b581018032f04f20d3818f" style="width:calc((100% - (1 * min(32px, 4vw))) * 0.5)"><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-2cd6d25d51b581f189c7dbd9f1b5b0b7"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3A051528e2-bd6a-4484-9116-875355c9ef00%3A%E5%BE%AE%E4%BF%A1%E5%9B%BE%E7%89%87_20251120165137_183_147.jpg?table=block&amp;id=2cd6d25d-51b5-81f1-89c7-dbd9f1b5b0b7&amp;t=2cd6d25d-51b5-81f1-89c7-dbd9f1b5b0b7" alt="notion image" loading="lazy" decoding="async"/></div></figure></div><div class="notion-spacer"></div><div class="notion-column notion-block-2cd6d25d51b58194a9c3f7f06184f943" style="width:calc((100% - (1 * min(32px, 4vw))) * 0.5)"><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-2cd6d25d51b581dc8030fc3ec83ed356"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/attachment%3Af5bedd0e-71d0-4bcf-844e-f87c0a90b4e5%3A%E6%B5%B7%E6%8A%A5_(2).png?table=block&amp;id=2cd6d25d-51b5-81dc-8030-fc3ec83ed356&amp;t=2cd6d25d-51b5-81dc-8030-fc3ec83ed356" alt="notion image" loading="lazy" decoding="async"/></div></figure></div><div class="notion-spacer"></div></div><div class="notion-blank notion-block-2cd6d25d51b5810d9038c00f8919ceb0"> </div><blockquote class="notion-quote notion-block-2cd6d25d51b581e5a184c8f71c639902"><div><span class="notion-orange"><b>温馨提示</b></span></div></blockquote><div class="notion-callout notion-gray_background_co notion-block-2cd6d25d51b58115acecdf698f9aeba1"><div class="notion-page-icon-inline notion-page-icon-span"><span class="notion-page-icon" role="img" aria-label="🙏🏻">🙏🏻</span></div><div class="notion-callout-text"><span class="notion-red"><b>如果您不想错过</b></span><span class="notion-default"><code class="notion-inline-code"><b>【老汪洞察】</b></code></span><span class="notion-red"><b>的文章，请将我们设为&quot;星标&quot;，这样每次最新文章推送才会第一时间出现在您的订阅列表里。
</b></span><span class="notion-default"><b>方法：</b></span><span class="notion-red"><b>点击文章页面左上角蓝色文字“</b></span><span class="notion-default"><code class="notion-inline-code"><b>老汪洞察</b></code></span><span class="notion-red"><b>”进入主页，点击</b></span><span class="notion-default"><code class="notion-inline-code"><b>关注</b></code></span><span class="notion-red"><b>后，再点主页</b></span><span class="notion-default"><code class="notion-inline-code"><b>右上角&quot;...&quot;</b></code></span><span class="notion-red"><b>，然后选择</b></span><span class="notion-default"><code class="notion-inline-code"><b>&quot;设为星标&quot;</b></code></span><span class="notion-red"><b>，即可完成，感谢您的支持。</b></span></div></div><div class="notion-blank notion-block-2cd6d25d51b581ee9e01c065a96869b6"> </div></main></div>]]></content:encoded>
        </item>
    </channel>
</rss>