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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

compare measure and column values

I have a measure using a SELECTEDVALUE and a calculated column. They're both whole numbers. How do you compare the values to return all the calculated columns that equal the measure? It returns records  for all the months for one year.
ReturnValue = IF(Table1[ColumnDateValue].[MonthNo] = Table1[MeasureValue],Table1[ColumnValue],BLANK())

3 REPLIES 3
v-lili6-msft
Community Support
Community Support

hi, @Anonymous 

It couldn't achieve that compare measure and column values, they are a different expression in logic.

For your requirement, you could create a measure based on the calculated column, then add another measure that 

ReturnValue = IF(Table1[secondMeasure] = Table1[MeasureValue],1,0)

 

Now just drag the calculate column into visual and drag the [ReturnValue] into the visual level filter and set is "1"

 

If you still have the problem, Please share some sample data and expected output.

 

Best Regards,

Lin

 

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

How do you create a measure to get the month number for each datefield1? 

hi, @Anonymous 

Sample data and expected output would help tremendously.

Column is Static, but Measrue is dynamic based on the row context, so you couldn't  compare measure and columns,

please share the sample data and i will give you a workaround.
Please see this post regarding How to Get Your Question Answered Quickly:
https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

 

Best Regards,

Lin

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

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 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.

Top Solution Authors