Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
newpower
Frequent Visitor

find a number in a other column and row

Hello,

 

i have a problem and hope anybody could help me.

 

This is my data source:

 

[MA Nr.]   [AbNR]

8904        153

8616        2368

8294        2368

2368        153

397          2368

 

Now i need a Messure to find out, if the [AbNR] is somewhere include in the [MA NR.].

 

Please help. bettina

1 ACCEPTED SOLUTION

@newpower

 

Try this MEASURE

 

Measure =
CONTAINS (
    CALCULATETABLE ( VALUES ( Table1[MA Nr.] ), ALLSELECTED ( Table1 ) ),
    Table1[MA Nr.], SELECTEDVALUE ( Table1[AbNR] )
)

Regards
Zubair

Please try my custom visuals

View solution in original post

4 REPLIES 4
ofirk
Resolver II
Resolver II

Hi @newpower,

Try:

is_in_AbNr = IF(NOT ISBLANK(LOOKUPVALUE([AbNR], [AbNR], [MA Nr.])), TRUE(), FALSE())

These are my results for your data:

res.PNG

Thanks for your answer. The problem is - this only works as a new column, but i need it as Measure, because if i filted the [AbNR ]and there is no match in the filted list, i want to overwrite the value. If i have the value in a column, i always have a match... for example:

 

MA Nr.  AbNR                                          if i filted on 2368 (AbNR) the solution should be:

397        2368 -> True                             MA NR.   AbNR
2368      153   -> False                            397          2368 -> False
8294      2368 -> True                             8294        2368 -> False
8616      2368 -> True                             8616        2368 -> False
8904      153   -> False

 

@newpower

 

Try this MEASURE

 

Measure =
CONTAINS (
    CALCULATETABLE ( VALUES ( Table1[MA Nr.] ), ALLSELECTED ( Table1 ) ),
    Table1[MA Nr.], SELECTEDVALUE ( Table1[AbNR] )
)

Regards
Zubair

Please try my custom visuals

Thank you - yes that was the right way 🙂

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.