如何在 Power BI 中使用 Year 参数获取当前月份的第一天? [英] How to get the first day of current month measure with Year parameter in Power BI?

查看:15
本文介绍了如何在 Power BI 中使用 Year 参数获取当前月份的第一天?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

看起来应该很简单,但我仍然无法通过参数Year"获取当前月份的第一天

Seems like it should be very simple, but I still couldn't fine the way to get the first day of current month having parameter "Year"

所以如果参数年份 2018 - 我需要 2018 年 5 月 1 日

So if parameter year 2018 - I need May 1,2018

如果参数年份 2017 - 需要 2017 年 5 月 1 日

if parameter year 2017 - need May 1, 2017

等等

我尝试使用 DATE 函数,但年份是动态的.

I tried to use DATE function, but the year will be dynamic.

如何简单地选择每月的第一天?

How simply choose the first day of the month?

谢谢

推荐答案

我不确定你的 year 参数是如何设置的,但是这些方面的东西怎么样?

I'm not sure how your year parameter is set up, but how about something along these lines?

FirstDayOfCurrentMonth = DATE([Year Parameter], MONTH(TODAY()), 1)

这篇关于如何在 Power BI 中使用 Year 参数获取当前月份的第一天?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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