DAX获取帐户名输入的最新日期

编程入门 行业动态 更新时间:2024-10-27 18:23:19
本文介绍了DAX获取帐户名输入的最新日期的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我发现了类似的报告问题,但到目前为止,没有一种解决方案有效。如果我输入的信息有误,请通知我。

I have found similar reported questions, but none of the solutions have worked so far. If I am entering the information incorrectly, please let me know.

我在Power Pivot中有一个表,其中包含重复的名称,以及输入的日期和名称。我想做的是获取名称的最新输入日期。

I have a table in Power Pivot that contains repeated names, and dates entered that go with the names. What I am trying to do is get the latest date entered for a name.

示例:

Name | Date | Latest Date A | 6/24/2016 | A | 6/24/2017 | A | 6/24/2018 | B | 7/05/2010 | B | 7/05/2011 | C | 6/8/2009 | C | 6/8/2010 | C | 6/8/2011 |

我希望在最新日期下拥有与名称相对应的最新日期。它应如下所示:

What I would like under Latest Date is to have the latest date that corresponds to the Name. It should look like the following:

Name | Date | Latest Date A | 6/24/2016 | 6/24/2018 A | 6/24/2017 | 6/24/2018 A | 6/24/2018 | 6/24/2018 B | 7/05/2010 | 7/5/2011 B | 7/05/2011 | 7/5/2011 C | 6/8/2009 | 6/8/2011 C | 6/8/2010 | 6/8/2011 C | 6/8/2011 | 6/8/2011

我尝试使用以下功能,但我得到的只是#错误(当然会根据文件中的数据更改表引用)

I've tried to use the following function, but all I keep getting are #Errors (of course changing the table reference based on the data in the file)

= CALCULATE( MAX(Table1[Date]); FILTER(Table1; Table1[ID] = EARLIER(Table1[ID]) ) )

如果以上功能正确,我想知道我做错了什么。 ()中的哪个值是列引用,哪个是单元格引用?

If the above function is correct, I wonder what I am doing wrong. Which one of the values in the () are column references and which ones are cell references? Perhaps that's where I am going wrong.

任何帮助都是非常感激的。我试图尽可能好地输入信息,以便为您提供帮助。

Any assistance is very appreciative. I tried to enter the information as nicely as possible so it can be assisted.

推荐答案

DAX中没有单元格或行引用。一切都由过滤器完成。

There are no cell or row references in DAX. Everything is done with filters.

尝试使用最新日期 。

= CALCULATE( MAX(Table1[Date]); FILTER(ALL(Table1); Table1[Name] = EARLIER(Table1[Name]) ) )

给一个镜头作为好吧,如果那不能解决问题:

Give this a shot as well if that doesn't do the trick:

= CALCULATE( MAX(Table1[Date]); ALLEXCEPT(Table1; Table1[Name]) )

更多推荐

DAX获取帐户名输入的最新日期

本文发布于:2023-11-09 15:20:37,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1572715.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:日期   帐户名   最新   DAX

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!