当没有指标和不一致的指标不正确的一年中,我如何纠正我的Excel Pivot桌子的掉落一年?

发布于 2025-01-24 15:16:08 字数 593 浏览 3 评论 0原文

我有以下记分卡表从枢轴表中填充(请参见下图)。

记分卡表,我是从枢轴表创建的 pivot

表桌子: = ifError(vlookup($ c8,$ af $ 6:$ ah $ 9,2,0),“”) = ifError(vlookup($ c8,$ af $ 3:$ ah $ 9,3,0),“”)
Vlookup中的2和3表示我需要数据的年份。

问题是,如果2021年没有指标,则枢轴表只有2022个指标,然后我的记分卡表列出了2021年2022年的指标。(示例在图像中),

我不能总是依靠2022在2022中。枢轴表中的相同列。这一切都取决于2021个数据。

如果没有2021年的数据,我如何让它在枢轴表中填充0?有没有办法欺骗Excel在2021年不播放时在数据/枢轴表中显示2021的方法?

谢谢你!

I have the below scorecard table that is being populated from a pivot table (See images below).

Scorecard table I'm creating from pivot table
Pivot table

below are the VLOOKUPs I am using to pull the metrics from the pivot table into the scorecard table:
=IFERROR(VLOOKUP($C8,$AF$6:$AH$9,2,0),"")
=IFERROR(VLOOKUP($C8,$AF$3:$AH$9,3,0),"")
the 2 and 3 in the vlookup represent the year i need the data for.

The issue is if there are no metrics for 2021, the pivot table will only have 2022 metrics listed and then my scorecard table lists the metrics intended for 2022 in the year 2021. (example in image)

I cannot always rely on 2022 being in the same column in the pivot table. it all depends on 2021 data being available.

If there is no data for 2021, how to I get it to populate a 0 in the pivot table? Is there a way to trick excel to show 2021 in the data/pivot table with a zero when 2021 is not poulating?

Thank you!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

久夏青 2025-01-31 15:16:08

您可以拥有一组包含您想要多年的数据,然后在Excel中使用Power查询来生成两个查询 - 第一个查看年份列表,第二个查询您的原始数据,即Pre -Pivot

使用HOME,MERGE查询在多年查询和RAWDATA查询之间进行左外连接。您最终将获得没有数据的几年中的空条目。然后对该合并查询的输出执行枢轴

You could have a set of data that contains all of the years you want then use Power Query within Excel to generate two queries - the first looks at the list of years, the second queries your raw data i.e. Pre-Pivot

Use Home, Merge queries to do a left outer join between the Years query and the RawData query. You will end up with null entries for the years where there is no data. Then perform the pivot on the output of that merged query

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文