Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Compare numerical values in two columns and flag if not same

Hello,

I have the following table visualization and i am trying to compare the values in both columns and if they do not match, then flag the column on the left. I have created a measure for this purpose, but due to some strange (probably long decimal?) differences, the similar values do not always match. Can this be enforced so that if the whole number values match, then it should be flagged as 1 otherwise 0? Any help is much appreciated!

 

Here is my measure:

Invoiced amount Check = 
IF ( [Invoiced amount (calculated)] <> [Invoiced amount (input)], 1, 0 )

 

 

  • Hi,

    Please try the below if it works.

     

    Invoiced amount Check =
    IF (
        ROUND ( [Invoiced amount (calculated)], 0 )
            <> ROUND ( [Invoiced amount (input)], 0 ),
        1,
        0
    )
    

9 Replies

  • Hi,

    Please try the below if it works.

     

    Invoiced amount Check =
    IF (
        ROUND ( [Invoiced amount (calculated)], 0 )
            <> ROUND ( [Invoiced amount (input)], 0 ),
        1,
        0
    )
    
    • Anonymous's avatar
      Anonymous
      Not applicable

      Jihwan_Kim Thanks for your reply! Is it possible to implement the measure above into a slicer to filter the rows of the table? For example, a slicer with the following 2 options:

      1. Show matching values (this would show only the table rows with the green tick)

      2. Show non-matching values (this would show only the table rows with the red cross)

      • Jihwan_Kim's avatar
        Jihwan_Kim
        Icon for Super User rankSuper User

        Hi,

        I think it is possible.

        If you can share your pbix file's link here, and then I can try to look into it to come up with a solution.

        Thanks.