SSAS - 返回不存在数据的日期 [英] SSAS - Return dates where no data exists

查看:40
本文介绍了SSAS - 返回不存在数据的日期的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在 SQL Server Analysis Services 中,如何返回不存在数据的日期的数据行?在这种情况下,理想情况下,我希望返回值 0.在普通 SQL 中,我会使用 CTE 来执行此操作.不过,我仍在研究 SSAS.

How, in SQL Server Analysis Services, how can I return rows of data for dates where no data exists? In this instance, ideally, I'd want to return the value of 0. In plain SQL, I would do this with a CTE. However, I'm still figuring out SSAS.

推荐答案

右键单击数据透视表并选择数据透视表选项.选择标有显示"的选项卡.有一个名为显示行中没有数据的项目"的选项.在那个旁边打勾.

Right-click on your PivotTable and choose PivotTable Options. Select the tab labeled "Display". There is an option called "Show items with no data in rows". Put a check mark by that one.

如果您更喜欢零,那么在布局上 &同一对话框的格式选项卡将显示空单元格"设置为 0.

If you prefer zero then on the Layout & Format tab of that same dialog set "For empty cells show" to 0.

这篇关于SSAS - 返回不存在数据的日期的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆