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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
zsechler
Frequent Visitor

IF Statement Help - EoF Error

Hello All

 

I have a dataset i am trying to simplfy. I have 3 values in one column that i am trying to create a custom column with an "IF" statement to just say billabe or non-billable. I keep getting a Eof Error though. Column type is text only. Values are text only but have special characters in there as you can see.

 

Things I tried

IF [#"Task - Phase/Task name"] = "Fixed Fee (Billable)" || [#"Task - Phase/Task name"] || "T&M (Billable)" || [#"Task - Phase/Task name"] = "Milestone (Billable)" then "Billable" else "Non-Billable"

 

IF ([#"Task - Phase/Task name"] = "Fixed Fee (Billable)",[#"Task - Phase/Task name"],"T&M (Billable)",[#"Task - Phase/Task name"] = "Milestone (Billable)") then "Billable" else "Non-Billable"

 

Thank you!!

2 ACCEPTED SOLUTIONS
fhill
Resident Rockstar
Resident Rockstar

 

Power Query 'Custom Columns' are different than DAX 'New Column'.  Try this...

 

= if [#"Task - Phase/Task name"] = "Fixed Fee (Billable)" or [#"Task - Phase/Task name"] = "T&M (Billable)" or [#"Task - Phase/Task name"] = "Milestone (Billable)" then "Billable" else "Non-Billable"

 

 




Did I answer your question, or help you along the way?
Please give Kudos or Mark as a Solution!


https://www.linkedin.com/in/forrest-hill-04480730/

Proud to give back to the community!
Thank You!




View solution in original post

v-xicai
Community Support
Community Support

Hi @zsechler ,

 

As fhill's suggestion, the formula in Power Query will works well. If the result returns the false value of non-billable, it means that the IF condition don't meet the actual values. Please pay attention to the case sensitive(lower case) and the accurate value within the "" in IF function, check if there may be spaces in "".

 

You can refer to the link:https://www.myonlinetraininghub.com/power-query-if-statements.

 

Best Regards,

Amy

 

Community Support Team _ Amy

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

5 REPLIES 5
v-xicai
Community Support
Community Support

Hi @zsechler ,

 

As fhill's suggestion, the formula in Power Query will works well. If the result returns the false value of non-billable, it means that the IF condition don't meet the actual values. Please pay attention to the case sensitive(lower case) and the accurate value within the "" in IF function, check if there may be spaces in "".

 

You can refer to the link:https://www.myonlinetraininghub.com/power-query-if-statements.

 

Best Regards,

Amy

 

Community Support Team _ Amy

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

zsechler
Frequent Visitor

Thank you, @fhill. It now prints out. That said it only prints the false value of non-billable. Wouldn't "or" work as i am using it?

 

Available values. 

Milestone (Billable)

Fixed Fee (Billable)

T&M (Billable)

Admin

Non-Project Work

PTO

 

Thank you for the help!!

Hi,

The Query Editor is case sensitive.  Please ensure that the case of what you type within "" in your If formula matches with the case of entries in that column.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
fhill
Resident Rockstar
Resident Rockstar

 

Power Query 'Custom Columns' are different than DAX 'New Column'.  Try this...

 

= if [#"Task - Phase/Task name"] = "Fixed Fee (Billable)" or [#"Task - Phase/Task name"] = "T&M (Billable)" or [#"Task - Phase/Task name"] = "Milestone (Billable)" then "Billable" else "Non-Billable"

 

 




Did I answer your question, or help you along the way?
Please give Kudos or Mark as a Solution!


https://www.linkedin.com/in/forrest-hill-04480730/

Proud to give back to the community!
Thank You!




fhill
Resident Rockstar
Resident Rockstar

P.S. the 'if' 'then' and 'else' have to be lower case!




Did I answer your question, or help you along the way?
Please give Kudos or Mark as a Solution!


https://www.linkedin.com/in/forrest-hill-04480730/

Proud to give back to the community!
Thank You!




Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors