Forum Discussion
find the True or False compare two table using common column in both table
- 3 years ago
Hi , Anonymous
Thank you for your sample data and detailed description for yoor need.
Here are the steps you can refer to :
(1)My test data is the same as yours.(2)We can click "New Column" and enter:
True/False = var _cur_code = [Itemcode] var _second_code =COUNTROWS(FILTER('Second Table','Second Table'[Itemcode]=_cur_code)) var _pack = [Pack outer] var _bomtext = MAXX( FILTER('Second Table','Second Table'[Itemcode]=_cur_code ) ,[BOMTEXT]) return IF(_second_code<=0 , "True" , IF(_pack<> BLANK() ,"True" , IF(_bomtext<> BLANK() ,"False" ,"True")))(3)Then we can meet your need , the result is as follows:
Thank you for your time and sharing, and thank you for your support and understanding of PowerBI!
Best Regards,
Aniya Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi , Anonymous
Thank you for your sample data and detailed description for yoor need.
Here are the steps you can refer to :
(1)My test data is the same as yours.
(2)We can click "New Column" and enter:
True/False = var _cur_code = [Itemcode]
var _second_code =COUNTROWS(FILTER('Second Table','Second Table'[Itemcode]=_cur_code))
var _pack = [Pack outer]
var _bomtext = MAXX( FILTER('Second Table','Second Table'[Itemcode]=_cur_code ) ,[BOMTEXT])
return
IF(_second_code<=0 , "True" , IF(_pack<> BLANK() ,"True" , IF(_bomtext<> BLANK() ,"False" ,"True")))
(3)Then we can meet your need , the result is as follows:
Thank you for your time and sharing, and thank you for your support and understanding of PowerBI!
Best Regards,
Aniya Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
- Anonymous3 years agoNot applicable
v-yueyunzh-msft its working .. thank you for your help.
- Anonymous3 years agoNot applicable
v-yueyunzh-msftone modificatiosn one measure . if First table item code if not available in Second table its should be False ..
- Anonymous3 years agoNot applicable
v-yueyunzh-msft i am trying to modify the above result for Itemcode conditions FA411213 and FA411215 . if Value available in First table and same time second table is blank or item code missing its a False .