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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

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
March Fabric Community Update

Fabric Community Update - March 2024

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

Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.