The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event! Join us in Stockholm, Sweden from September 24-27, 2024.
2-for-1 sale on June 20 only!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
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.
thanks for your help.
David
Solved! Go to Solution.
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:
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.
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:
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.
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the June 2024 Power BI update to learn about new features.
User | Count |
---|---|
39 | |
20 | |
19 | |
15 | |
13 |