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

A new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.

Reply
Tyler_T
New Member

IF function and Measures

Hello,

 

I am struggling to get something that I think should be simple working. I would like to have a calculated column added to my main data table that compares the value of one column line by line against a measure that is a text value and returns a 1 if they are equal and 0 if they are not.

 

The DAX statement I would like to use is Dedication Match = IF([Dedication 1] = [Selected Group], 1,0) but the 1s and 0s it returns doesn't match up

 

[Dedication 1] is a text value from the data source and [selected group] is a SELECTEDVALUE measure that returns the text value of the selected item of a dropdown in a single column group table.

 

If I replace the measure with just the text value of the measure in parentheses it returns the right 1s and 0s.

 

Am I doing something wrong or with calculated columns can you only use the IF statement to comapre the value of a cell against a simple text or numerical value?

1 REPLY 1
Manoj_Nair
Solution Supplier
Solution Supplier

@Tyler_T- Check this out and let me know if this works or not?

Dedication Match Measure =
VAR CurrentDedication = MAX('Table'[Dedication 1])
VAR CurrentGroup = [Selected Group]
RETURN
IF(CurrentDedication = CurrentGroup, 1, 0)

 

Helpful resources

Announcements
May Power BI Update Carousel

Power BI Monthly Update - May 2026

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

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

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.