简体   繁体   English

Power BI:过滤预测版本

[英]Power BI: filter on forecast version

I am in a bit of a puzzle here and hope you guys can help: I have the following table showing our forecast version:我在这里有点困惑,希望你们能提供帮助:我有下表显示了我们的预测版本:

预测版本表

Our forecast process works in the following way: On the first day, each month, we get a new "SOP Version" and "LAG 1".我们的预测过程按以下方式进行:在每个月的第一天,我们会得到一个新的“SOP 版本”和“LAG 1”。 After some days the "latest" LAG-version changes from "LAG 1" to "LAG 0" for the rest of the month.几天后,当月 rest 的“最新”LAG 版本从“LAG 1”变为“LAG 0”。

Example in table: Latest "SOP Version"=SOP5.表中示例:最新的“SOP 版本”=SOP5。 From "day 1" to fx.从“第一天”到外汇。 "day 4" the table will be loaded with "LAG 1" only. “第 4 天”该表将仅加载“LAG 1”。 On "day 5" the table will be enriched with "LAG 0".在“第 5 天”,表格将增加“LAG 0”。

Now, what I want to make is a dynamic (global) filter, which always filters the latest "SOP" and "LAG"-version on the Power BI report I have.现在,我想做的是一个动态(全局)过滤器,它总是过滤我拥有的 Power BI 报告中最新的“SOP”和“LAG”版本。

I have managed to make a summarized table in Power BI filtering the "lowest" LAG value for each SOP-version:我已经设法在 Power BI 中制作了一个汇总表,过滤每个 SOP 版本的“最低”LAG 值:

SOP&LAG (Latest Vers) = SUMMARIZE('Forecast';'Forecast'[SOP Version];"LAG (lowest value)";MINX('Forecast';'Forecast'[LAG]))

But I can't figure out to isolate the the latest SOP Version (SOP5) with its latest LAG-version (LAG0).但我无法将最新的 SOP 版本 (SOP5) 与其最新的 LAG 版本 (LAG0) 隔离开来。 I am not even sure this is the right approach?我什至不确定这是正确的方法吗? All ideas will be greatly appreciated.所有的想法将不胜感激。 Thanks.谢谢。 Br, Jakob兄弟,雅各布

I think you can filter your table with TOPN() like this:我认为您可以像这样使用 TOPN() 过滤您的表格:

TOPN(1;SOPLAG;SOPLAG[SOP Version];DESC;[SOP Version];ASC)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM