Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
I have a two table one table Global Another one Local . Both table have common value Itemnumber , based on
Global Table :
Itemnumber Pack
101
102
103 NewHL
104 NewPack
Local Table :
Itemnumber BOMTEXT
101
102 CH
103
104 NewPack
Based on the item i am trying to get true or false result
Global Pack | Local (BOM text) | Output Result |
Blank | Blank / Item code is missing in local input file | TRUE |
Blank | Value | FALSE |
Value | Blank / Item code is missing in local input file | FALSE |
Value | Value | TRUE |
Expect Output:
Itemnumber Pack BOMTEXT true/false
101 TRUE
102 CH FALSE
103 NewHL FALSE
104 NewPack NewPck TRUE
Looking for support. thanks in advance..
Solved! Go to Solution.
Hi @Anonymous ,
According to your statement, I suggest you to try this code to create a measure.
True/False =
VAR _ADD =
ADDCOLUMNS (
'Global',
"True/False",
IF (
(
'Global'[Pack] = BLANK ()
&& NOT ( 'Global'[Itemnumber] IN VALUES ( Local[Itemnumber] ) )
)
|| ( 'Global'[Pack] = RELATED ( Local[BOMTEXT] ) ),
"TRUE",
"FALSE"
)
)
RETURN
MAXX ( _ADD, [True/False] )
Result is as below.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
According to your statement, I suggest you to try this code to create a measure.
True/False =
VAR _ADD =
ADDCOLUMNS (
'Global',
"True/False",
IF (
(
'Global'[Pack] = BLANK ()
&& NOT ( 'Global'[Itemnumber] IN VALUES ( Local[Itemnumber] ) )
)
|| ( 'Global'[Pack] = RELATED ( Local[BOMTEXT] ) ),
"TRUE",
"FALSE"
)
)
RETURN
MAXX ( _ADD, [True/False] )
Result is as below.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous
if the tables are connected with a relationship, then you can use
True/False =
SELECTEDVALUE ( Local[Pack] ) = SELECTEDVALUE ( Global[Pack] )
Hi,
I created a demo for you, I think this might be help.
If the answer helps please accept the solution 🙂
User | Count |
---|---|
25 | |
11 | |
8 | |
7 | |
6 |
User | Count |
---|---|
24 | |
13 | |
12 | |
10 | |
6 |