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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
Daleb
New Member

Add columns to identify value that were not there the date before

Hello,

 

I'm looking to add a column to identify the values that were not there the date before my last update.

 

So every couple day I add data to my excel file and I want to identify if the value is or is not in the column name. If it is a new name I want to return "Yes" and if not "no". Plus In the same day it could happen that I have the same name, but I need to be included as yes.

 

IMG_3567.jpeg


thanks for your help.

David

 

1 ACCEPTED SOLUTION
v-yanjiang-msft
Community Support
Community Support

Hi @Daleb ,

According to your description, here's my solution.

1.Add an index column. As your data are ranked by date, to identify if there is same name in the same day, we need an index column.

2.Add a custom column in Power Query:

if Table.SelectRows(#"Added Index",(x)=>x[Name]=[Name] and x[Index]<[Index])[Name]={} then "No" else "Yes"

Or if you prefer a calculated column:

Column =
IF (
    COUNTROWS (
        FILTER (
            'Table',
            'Table'[Name] = EARLIER ( 'Table'[Name] )
                && 'Table'[Index] < EARLIER ( 'Table'[Index] )
        )
    ) > 0,
    "Yes",
    "No"
)

Get the correct result:

vyanjiangmsft_0-1689145453380.png

I attach my sample below for your reference.

 

Best regards,

Community Support Team_yanjiang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
v-yanjiang-msft
Community Support
Community Support

Hi @Daleb ,

According to your description, here's my solution.

1.Add an index column. As your data are ranked by date, to identify if there is same name in the same day, we need an index column.

2.Add a custom column in Power Query:

if Table.SelectRows(#"Added Index",(x)=>x[Name]=[Name] and x[Index]<[Index])[Name]={} then "No" else "Yes"

Or if you prefer a calculated column:

Column =
IF (
    COUNTROWS (
        FILTER (
            'Table',
            'Table'[Name] = EARLIER ( 'Table'[Name] )
                && 'Table'[Index] < EARLIER ( 'Table'[Index] )
        )
    ) > 0,
    "Yes",
    "No"
)

Get the correct result:

vyanjiangmsft_0-1689145453380.png

I attach my sample below for your reference.

 

Best regards,

Community Support Team_yanjiang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

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

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

Top Solution Authors
Top Kudoed Authors