使用 MDX 获取非空值的最后日期
您知道如何使用 mdx 查询获取最后一个非空值吗?然后在那之后……我想计算截至最后日期为止它旁边有多少个空值。我这样做的主要目的是计算客户有多少天没有交易。
我必须在 ssrs 中制作一份报告(使用 Adventure Works Cube)来计算客户有多少天没有交易。
谢谢。
Do you know how to get the last non-empty value using mdx query.. then after that.. i want to count how many null values are next to it up to the last date. My main purpose for this is to count how many days a customer has no transaction..
i have to make a report in ssrs (using adventure works cube) that counts how many days a customer has no transaction..
thanks..
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
使用本文获取一组非空日期。
要获得计数,您可以:
在这种情况下),只需从一个值中减去另一个值即可。
最后一个日期为非空值,前一个日期使用 LAG(1),包括
它们到下一个构造 {prev.date:last.date} 并使用 COUNT
对于集合
Use this article to obtain set of non empty dates.
To obtain count you can:
this case) and just subtract one value from another.
last date with non empty value, previous one using LAG(1), include
them to the next construction {prev.date:last.date} and use COUNT
for set
最近我关注这个文章,这确实对我有帮助。
最重要的部分是了解范围的用法。
即使您没有企业版,您也可以使用它。
Recently I follow this article, It really helps me.
The most important part is to understand scope usage.
Even If you don't have an Enterprise Edition, you can use it.