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!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
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.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!