创建DAX功能所需的帮助 [英] Help needed for creating DAX function

查看:99
本文介绍了创建DAX功能所需的帮助的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我想在我的SSAS表格模型中添加一个新度量。


输出必须像下方:


             新年          2018          2019        差异


状态     


赢了                        10 NBSP;             18            8


丢失                          5                3            -2


我想添加差异列,这会计算所选帐户赢/输的差异这是怎么做到的?


我需要两列吗?


什么将是公式,以便它采用日期过滤器并计算差异?


请帮忙。

解决方案

您好DD44P,


感谢您的提问。


如果您以非粗体格式输出,则可以添加计算列[差异]到输出表。所以DAX表达式是:

 ='YourTableName'[2019]  - 'YourTableName'[2018] 

最诚挚的问候,




Hi,

I want a new measure to be added in my SSAS tabular model.

The output has to be like below:

              Year          2018         2019       Difference

Status     

Won                        10              18           8

Lost                         5                3            -2

I want to add the difference column when which will calculate the difference of Accounts won/lost in the selected years.

How can this be done?

Do I need two columns for this?

What will be the formula so that it takes the date filter and calculate the difference?

Please help.

解决方案

Hi DD44P,

Thanks for your question.

If you have got the output in non-bold format, you could just add calculated column [Difference] to the output table. So the DAX expression is :

='YourTableName'[2019]-'YourTableName'[2018]

Best Regards,

Will


这篇关于创建DAX功能所需的帮助的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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