Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
what error in this M Code
"Year_2", each if [Semester] = 1 then [Year_1] + 1 else [Year_1] - 1)
Please help me
Please looking the error message below
How to fix this?
Hi @Anonymous ,
I would say your Year column is a Text data type, due that you can't add 1 as a number.
Solution is, change Year to number before this operation.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Check out the February 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 16 | |
| 12 | |
| 10 | |
| 7 | |
| 6 |