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

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

Reply
jsebago
Regular Visitor

Comparing measures with wrong result

Hello All,

 

I am trying something very simple but I haven't been able to figure out why is not working:

I am using an IF function to compare 2 measures:

 

jsebago_0-1727978571497.png

Measure 2 is a constant equal to 1.

Measure is a calculate function that sums the number of rows of a table

jsebago_1-1727978670087.png

IF function ALWAYS returns true, even when they are no equal. I am usign cards to check the values:

 

jsebago_2-1727978769215.png

I appreciate any guidance. I am going nuts

 

Regards

 

1 ACCEPTED SOLUTION
parry2k
Super User
Super User

@jsebago are you adding compare as a column or a measure? it should be a measure.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

View solution in original post

3 REPLIES 3
jsebago
Regular Visitor

I knew I was missing something simple 
@parry2k thanks, compare was a column 

Anonymous
Not applicable

Hi @jsebago ,

What about trying the strict equality operator or converting to text and then comparing?

Compare 1 = IF([Measure]==[Measure 2],"True","False")
Compare 2 = IF(EXACT([Measure],[Measure 2]),"True","False")

vcgaomsft_0-1728011790658.png

 

 

 

 

 

vcgaomsft_1-1728011913900.png

Reconfirm that [Measure] and [Measure 2] are measures (icons for measure).

If the problem remains unresolved, please consider posting a sample pbix file.

How to provide sample data in the Power BI Forum - Microsoft Fabric Community

 

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly --  How to provide sample data in the Power BI Forum 

parry2k
Super User
Super User

@jsebago are you adding compare as a column or a measure? it should be a measure.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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