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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
MauriceMecowe
Resolver II
Resolver II

IF statement in measure

I’m trying to compare the Turnover per ID (OID) from 2 systems. If they don’t match the difference is calculated with a measure as in the picture below. I would like to add another measure that does the following: If the amount in the delta column is zero then it should say "Match", if it is not 0, then it should say "No Match". Is this possible

 

The code for the measures in the picture is:

 

NAV Turnover Detailed:= SUM(Recon_Detailed[NAV-Turnover])
CRM Turnover Correct:= SUMX(VALUES(Recon_Detailed[NAV-OID]), [CRM Turnover Detailed] / [OIDM])
Delta Turnover Detailed:= [NAV Turnover Detailed] - [CRM Turnover Correct]

Delta column question.JPG

1 ACCEPTED SOLUTION
Cmcmahan
Resident Rockstar
Resident Rockstar

MatchFlag = IF( [Delta Turnover Detailed] = 0, "Match", "No Match")

View solution in original post

6 REPLIES 6
Cmcmahan
Resident Rockstar
Resident Rockstar

MatchFlag = IF( [Delta Turnover Detailed] = 0, "Match", "No Match")

Awesome @Cmcmahan , that does the trick! Just one more question, is it possible to use this also as a filter?

 

So I can filter the table on whether it's a match or not?

You can filter on the measure in the visual level filter if the measure is part of the displayed data.

 

If not, you need to set it up as a calculated column, and then you can slice/filter on that.

Tha's unfortunately not possible, since it'll say I have a circular dependency...

What's the circular dependency?

I entered this formula 

= IF( [Delta Turnover Detailed] = 0, "Match", "No Match")

Maybe because i'm referencing a measure which is also calculated on this table.

 

 

Circular dependency.JPG

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.