Forum Discussion
Correct use of Except function
- 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] ) ) - 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.
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]
)
)
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.