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

The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!

Reply
dskeane
Helper I
Helper I

If Statement

Looking to figure out a solution with multiple If statements. Scenario below. 

 

Example, I have a column called ProjectScope / LaborBilling "Labor billing reflects the total revenue associated with a project" 

 

Project Scope

New

Upgrade

Custom Dev

 

Looking to create a measure that  IF Project Scope = 'New' then take LaborTotal Column/125, IF Project Scope = 'Upgrade' then take LaborTotal Column / 100, IF Project Scope = ' Custom Dev' then take LaborTotal Column/200.

 

ProjectScope and LaborBilling are not calculated columns. 

 

Using data grid to display project name and new measure is the end result.

 

Any thoughts are appreciated. 

 

 

 

 

1 ACCEPTED SOLUTION
Phil_Seamark
Microsoft Employee
Microsoft Employee

Hi @dskeane

 

Have you considered creating a calculated column that incorporates that logic?

 

And then you can create simple measures over the new column.


To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

View solution in original post

6 REPLIES 6
Phil_Seamark
Microsoft Employee
Microsoft Employee

Hi @dskeane

 

Have you considered creating a calculated column that incorporates that logic?

 

And then you can create simple measures over the new column.


To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

Capture.PNG This will get me on the right track, however I am running into an issue with the error in the screen shot. T&M is coming from another colum not related to my formula?

 

Hi @dskeane

 

What is the datatype of your [LaborBilling] column?


To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

LaborBilling Data Type:Text Format:Text

I think this is the problem.  You have text in that column and you are trying to use a mathmatic operator with a text value.

 

You can extend your IF statement to only look for numeric values, or filter out the text from this column and convert the column to numeric.


To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

Nevermind, oversite on my end. I should have been using another colum called calculatedlaborttl this has a decimal data type. 

 

I am smooth sailing from this point on, thanks for the suggestion! 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! It's time to submit your entry.

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.