This is best Fabric, Power BI, SQL and AI community event. How do we know? The last event sold out! Save €200 with code FABCMTY200.
Register 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)
Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.
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 |
|---|---|
| 25 | |
| 23 | |
| 19 | |
| 17 | |
| 14 |
| User | Count |
|---|---|
| 24 | |
| 23 | |
| 20 | |
| 20 | |
| 19 |