需要 Power Bi 功能 DATEADD 的建议
我怎样才能创建这样的测量: 如果 email_name = '1' 则向 some_value 添加 4 天,如果 email_name = '2' 则向 some_value 添加 4 天。
所以我认为这个想法很明确。 对不起我的英语。
How can i create mesure like that:
If email_name = '1' add 4 days to some_value , If email_name = '2' to some_value.
So i think the idea is clear.
Sorry for my English.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
因为我想您想要逐行执行 IF 条件,所以创建计算列而不是度量会更好。无论如何,计算列的 DAX 看起来像这样:
我在这里建议使用 SWITCH 语句,以避免构建嵌套 IF 语句的麻烦。请记住,您的
[some_date_value]
列需要是日期或数字的数据类型,以便 Power BI 可以添加天数。Because I imagine you are wanting to do an IF condition row-by-row, you'd be much better served by creating a calculated column as opposed to a measure. In any case, your DAX for the calculated column would look something like this:
I recommend a SWITCH statement here so as to aviod the nuisance of building nested IF statements. Keep in mind that your
[some_date_value]
column will need to be the data type of date or numeric so that Power BI can add the days.