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
SuperCal99
Helper I
Helper I

Finding Ids across multiple columns

Hi,

 

I have been asked to compare if a specific id is present across a number of years - yes and no means they are present, blank means they are not present.

Below is an example of what i need - the data is within one table

 

Essentially i need the result in column e, stating whether the ID is present within each year column "yes", "no", and ignoring blanks.

 

Any help or additional questions needed please let me know

 

Kind regards,

 

Callum

 

 

    Result 
Abcde 
ID201920202021in 2021 and 2020 and 2019? 
000113 NoYesYes 
000114  YesNo 
000115  YesNo 
000116No YesYes 
000117  YesNo 
1 REPLY 1
Tanushree_Kapse
Impactful Individual
Impactful Individual

Hi @SuperCal99 ,
You can create a calculated column using the IF condition as mentioned below:
e = IF(AND(AND(b=" ",c="No"),d="Yes"),"Yes",
      IF(AND(AND(b=" ",c=" "),d="Yes"),"No",
      IF(AND(AND(b=" ",c=" "),d="Yes"),"No",
      IF(AND(AND(b="No ",c=" "),d="Yes"),"Yes",
      IF(AND(AND(b=" ",c="Yes"),d="No"),"No",blank())))))

I hope this helps!

@SuperCal99 

Did I answer your question? Mark my post as a solution! 

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.

Top Solution Authors