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
Giada90
Helper III
Helper III

problem with m formula

Hi,

I need to create a column in power query editor, I need to use an if function and I need to moltiplicate the result, I try a formula like this but it gives me error when I try to moltiplicate

 

(each if [#"What_relationship"] = "Neutral" then 1 else if [#"What_relationship"] = "Not satisfied" then 2 else 0)*2

 

 

if I try to use the if column (called personalizzato) and I use this formula it works

[Personalizzato.1]*2

 

any suggestion?

Thanks

1 ACCEPTED SOLUTION
DOLEARY85
Resident Rockstar
Resident Rockstar

just remove the each at the begining.

 

try this in the custom column formula:

 

(if [#"What_relationship"] = "Neutral" then 1 else if [#"What_relationship"] = "Not satisfied" then 2 else 0)*2

View solution in original post

2 REPLIES 2
DOLEARY85
Resident Rockstar
Resident Rockstar

just remove the each at the begining.

 

try this in the custom column formula:

 

(if [#"What_relationship"] = "Neutral" then 1 else if [#"What_relationship"] = "Not satisfied" then 2 else 0)*2

THANKS!

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Top Solution Authors