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 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss 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)
Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.
Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.
| User | Count |
|---|---|
| 27 | |
| 26 | |
| 25 | |
| 20 | |
| 16 |
| User | Count |
|---|---|
| 51 | |
| 48 | |
| 43 | |
| 39 | |
| 36 |