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
rashel2002
Helper II
Helper II

Help in writing a custom column (what's wrong with my formula?)

Hi everyone!

 

i'm working on my data and i'm trying to add a new column that will tell for each task it's status (Not start yet/WIP/Done). so here's what i have now and what i'm trying to get (marked in yellow)-

20.PNG

 

Now here's the formula i wrote-

NotStarted/WIP/Done = if([TaskDuration]-[CurrentStatus])=0, "Done", (if([TaskDuration]=[CurrentStatus], "Not started", "WIP"))

21.PNG

Can you please tell me what's wrong with my formula and how can i make it work?

(Edit: the error message says "The syntax ',' is incorrect" but i don't know what should i write instead [i tried to put "then" & "else" instead of the commas , but it atill not working)

 

Thx!!

1 ACCEPTED SOLUTION

Oops! If you copy and pasted I made a slight syntax error. Try this: 

 

=IF(([TaskDuration] - [CurrentStatus]) = 0, "Done", IF([TaskDuration] = [CurrentStatus], "Done", "WIP"))

View solution in original post

5 REPLIES 5
JoHo_BI
Responsive Resident
Responsive Resident

Hi Rashel,

 

You're closing the brackets too early, your formula should read: 

 

=IF(([TaskDuration] - [CurrentStatus) = 0, "Done", IF([TaskDuration] = [CurrentStatus], "Done", "WIP"))

 

Hope that helps!

Hi.

 

thank you for your time - it's still not working (and have the same error message) \

Oops! If you copy and pasted I made a slight syntax error. Try this: 

 

=IF(([TaskDuration] - [CurrentStatus]) = 0, "Done", IF([TaskDuration] = [CurrentStatus], "Done", "WIP"))

Oops, i didn't add it to the right place and that was the problem!

thank you so much for your help :

haha I know, i changed it already. it's not it 😕

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.