Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowJuly 28 - August 9 | Final Round of the Power BI Dataviz World Championships. This is your chance. Learn more
Hello All,
Found a strange error in powerbi, where it is not able to convert month & year to a date for month 6 only:
below the dax:
Solved! Go to Solution.
@Anonymous , Try var day like
var day = Switch(true(),
vw_LoadSummaryINTL[Month] = 2,28,
vw_LoadSummaryINTL[Month] in (4,6,9,11) , 30,
31)
or
Transaction Date =
eomonth(date(vw_LoadSummaryINTL[Year], vw_LoadSummaryINTL[Month],1),0)
@Anonymous
There are small mistakes, there is only 30 days in June. So change 5 to 6 in your formula:
Paul Zheng _ Community Support Team
If this post helps, please Accept it as the solution to help the other members find it more quickly.
@Anonymous
There are small mistakes, there is only 30 days in June. So change 5 to 6 in your formula:
Paul Zheng _ Community Support Team
If this post helps, please Accept it as the solution to help the other members find it more quickly.
Yes, sorry for the error, found that after posting here.
Regardless, I used your simple version and helped me a lot.
thank you for your help!
@Anonymous , Try var day like
var day = Switch(true(),
vw_LoadSummaryINTL[Month] = 2,28,
vw_LoadSummaryINTL[Month] in (4,6,9,11) , 30,
31)
or
Transaction Date =
eomonth(date(vw_LoadSummaryINTL[Year], vw_LoadSummaryINTL[Month],1),0)
If you love stickers, then you will definitely want to check out our community sticker challenge, Barcelona edition!
Check out the July 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 29 | |
| 28 | |
| 20 | |
| 20 | |
| 19 |
| User | Count |
|---|---|
| 35 | |
| 28 | |
| 21 | |
| 19 | |
| 17 |