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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
MPereira
Frequent Visitor

How to search a value in the same column

Hi experts... I need your help.

 

I have a quality database of my products where one of my information is the LOTE.
In my quality process I can disapprove a complete LOTE (mother lote), or simply part of the LOTE (Children Lote).

 

My scenery.png                          


I identify a Mother Lote when the code does not have the hyphen (-) and the first 14 characters are the same as the first 14 characters of the child Lote.

 

In that case, when I reject the Mother Lote, I need to disregard the child lotes from my analysis. For example:

          Captura de Tela 2018-12-12 às 17.08.20.png

 

I tried several ways to mark these children lotes with some flag, but I could not find a correct way to do this programming.


Anyone have any idea how to do it?

1 ACCEPTED SOLUTION

@MPereira

 

Try this for your calculated column. Bear in mind that I am assuming here that IDs for Mother Lotes always have 14 characters and IDs for Children Lotes always 17 as you show.

 

Table1[Delete] = 
VAR IsChildrenLote = (LEN(Table1[Lote])=17)
RETURN
IF(IsChildrenLote;
     IF(CONTAINS(Table1;Table1[Lote];MID(Table1[Lote];1;14));"X")
)

 

View solution in original post

13 REPLIES 13

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.