Don't miss your chance to take exam DP-600 or DP-700 on us!
Request nowLearn 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.