Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
TheGunners
New Member

M Code error

what error in this M Code

 

 

 

"Year_2", each if [Semester] = 1 then [Year_1] + 1 else [Year_1] - 1)

 

 

 

Please help me 

2 REPLIES 2
TheGunners
New Member

Please looking the error message below

TheGunners_0-1679175485370.png


How to fix this?

Hi @TheGunners ,

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.

 

 



If my answer was helpful please give me a Kudos or even accept as a Solution.

Let's connect on LinkedIn!

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors