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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Syndicate_Admin
Administrator
Administrator

Struggling with the If statement

I have a column with numbers both negative and positive. Now i want to add a column that states 'negative' whenever a number is below 0 and 'positive' whenever its above. My formula is if([Transactiebedrag]=<0) then ([Transactiebedrag]= "negative") else ([Transactiebedrag]= "positive") . I keep getting an error where its expecting a token literal. Can anyone help me optimise the formula?

2 REPLIES 2
mussaenda
Super User
Super User

Hi @Syndicate_Admin,

 

mussaenda_0-1696835684902.png

 

Anonymous
Not applicable

Try

if [Transactiebedrag] <= 0 then "negative" else "positive"

 

--Nate

 

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors