cancel
Showing results for 
Search instead for 
Did you mean: 
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
March 2023 Update3

Power BI March 2023 Update

Find out more about the March 2023 update.

Top Kudoed Authors