Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hi
is it posible starting from columns month no (1-12) and year to obtain a column with number of days of each year-month?
Year Month Days
2019 1 31
2019 2 28
2019 1 31
etc
Thanks!
Cosmin
Solved! Go to Solution.
Hi @cosminc,
If I understand your scenario correctly that you only have Year and Month column, you want to get the days based on the year and month columns?
If it is, we could achieve that in Power BI, please follow the steps below.
If your month and year columns are text type, you could create a custom column in query editor and then change the column to be date type.
=[Year]&"-"&[Month]
After Close&&Apply, you could create a calculated column with the formula below.
Days = DAY(EOMONTH([Date],0))
Here is the output.
Best Regards,
Cherry
Hi @cosminc,
If I understand your scenario correctly that you only have Year and Month column, you want to get the days based on the year and month columns?
If it is, we could achieve that in Power BI, please follow the steps below.
If your month and year columns are text type, you could create a custom column in query editor and then change the column to be date type.
=[Year]&"-"&[Month]
After Close&&Apply, you could create a calculated column with the formula below.
Days = DAY(EOMONTH([Date],0))
Here is the output.
Best Regards,
Cherry
Hi
this is it
thanks!
Cosmin
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
124 | |
79 | |
50 | |
38 | |
38 |
User | Count |
---|---|
195 | |
80 | |
70 | |
51 | |
42 |