Forum Discussion

Applicable88's avatar
Applicable88
Icon for Impactful Individual rankImpactful Individual
3 years ago
Solved

Correct use of Except function

Hello,  I have two sample tables here: TableA: Material Status 123456 V 123457 V 123458 V 123459 V 123460 V 123461 V 123462 V 123463 V 123464 V   Table...
  • Jihwan_Kim's avatar
    3 years ago

    Hi,

    In my opinion, 123462/V from tableA and 123462/A from tableB are different. 

    If you can try to compare 123462/V from tableA and 123462/V from tableB, I think EXCEPT function may work as you expect.

    But, by using the above sample, please check the below and the attached file.

     

     

     

    Example Table Test NO.2 =
    CALCULATETABLE (
        TableA,
        TREATAS (
            EXCEPT (
                CALCULATETABLE ( VALUES ( TableA[Material] ), TableA[Status] = "V" ),
                CALCULATETABLE ( VALUES ( TableB[Material] ), TableB[Status] = "A" )
            ),
            TableA[Material]
        )
    )
    
  • Applicable88's avatar
    Applicable88
    3 years ago

    Jihwan_Kim , as always very good explained. Thank you very much, that is the expected outcome. I will read more into usage of TREATAS() -Function.