cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
MetricsBI
Frequent Visitor

Combining two formulas

Hello,

 

I am trying to figure out how to add a formula that will look at two coloums and will return one value based on the critera. I want it to return value "Yes" where the resource is pricing and the TaskId is >=90 and "No" when either 1 or both of those if false. I keep on getting an error when i try to make the formula. Something about the dax comparison operations do not support comparing values of type True/False with values of type Text. Below is a table to help.

 

MetricsBI_0-1623347769794.png

 

1 ACCEPTED SOLUTION

The [TaskId] = "03" has to be type text. Try as:

Column = 
IF(
    'Table'[Resource] = "Pricing" && VALUE('Table'[TaskId]) >= 90,
    "Yes",
    "No"
)

or as a measure:

Measure = 
IF(
    SELECTEDVALUE('Table'[Resource]) = "Pricing" && VALUE(SELECTEDVALUE('Table'[TaskId])) >= 90,
    "Yes",
    "No"
) 

image.png






Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

Proud to be a Super User!



View solution in original post

3 REPLIES 3
Shahfaisal
Resolver II
Resolver II

Perhaps your taskId column is of type text? If so, change that to numeric type and try the formula again.

The same error appears.

 

MetricsBI_0-1623350003392.png

 

The [TaskId] = "03" has to be type text. Try as:

Column = 
IF(
    'Table'[Resource] = "Pricing" && VALUE('Table'[TaskId]) >= 90,
    "Yes",
    "No"
)

or as a measure:

Measure = 
IF(
    SELECTEDVALUE('Table'[Resource]) = "Pricing" && VALUE(SELECTEDVALUE('Table'[TaskId])) >= 90,
    "Yes",
    "No"
) 

image.png






Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

Proud to be a Super User!



View solution in original post

Helpful resources

Announcements
PBI_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Get Ready for Power BI Dev Camp

Microsoft named a Leader in The Forrester Wave

Microsoft received the highest score of any vendor in both the strategy and current offering categories.

Get Ready for Power BI Dev Camp

Power BI Dev Camp - September 30th, 2021

Mark your calendars and join us for our next Power BI Dev Camp!

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Top Solution Authors