Forum Discussion

MauriceMecowe's avatar
MauriceMecowe
Resolver II
7 years ago
Solved

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]

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

6 Replies

  • Cmcmahan's avatar
    Cmcmahan
    Resident Rockstar
    MatchFlag = IF( [Delta Turnover Detailed] = 0, "Match", "No Match")
    • MauriceMecowe's avatar
      MauriceMecowe
      Resolver II

      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?

      • Cmcmahan's avatar
        Cmcmahan
        Resident Rockstar

        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.