简体   繁体   English

按月获取dax中的最后一个值

[英]Get the last value by month in dax

I have a table with registered values every day, I need a dax measure to get only the last value of the las day each month.我每天都有一个包含注册值的表格,我需要一个 dax 度量来获取每个月最后一天的最后一个值。

Original table原表

To see only this只看这个

Needed calculation需要计算

How can I solve it?我该如何解决?

You can use this dax query to create a result table with last value of each month您可以使用此 dax 查询创建一个包含每个月最后一个值的结果表

Table = SUMMARIZECOLUMNS(Sheet1[Date], "last_value", LASTNONBLANK(Sheet1[Amount], 1))

See the screenshot with test data for reference:请参阅带有测试数据的屏幕截图以供参考:
Original table:原表:
在此处输入图像描述


Result table:结果表:
在此处输入图像描述

Let me know if this is what you are looking for and if this solution works.让我知道这是否是您正在寻找的以及该解决方案是否有效。

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

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