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
mibu
Employee
Employee

Add additional column to a .pbix file

Hello Power BI Community,

 

Pls see Test Case.pbix, access via following link:

 

Link to .pbix file

 

In it, I have added a column called, "Key" that analyzes each line item and assigns it either "Key" or "Not Key" based on values contained under Criteria A, B and C.

 

I would like to add a second column called, "Key2" that analyzes each line of data and assigns it "Key" if it matches the very same parameters as "Key" OR if the line item contains a "W" under Criteria D, else "Not Key".

 

Thanks so much and look forward to your feedback regarding the edit to formula that will get me there.

 

mibu

1 ACCEPTED SOLUTION
Thim
Resolver V
Resolver V

Ok, so if the column "Key" has the value key, or if column "Criteria D" has value W, then the new colum should assign the value Key.

 

Try this.

Key2 = IF(OR(data[Key]="key";data[Criteria D]="W");"Key";"Note Key")
 
Hope this will help. 🙂

View solution in original post

2 REPLIES 2
Thim
Resolver V
Resolver V

Ok, so if the column "Key" has the value key, or if column "Criteria D" has value W, then the new colum should assign the value Key.

 

Try this.

Key2 = IF(OR(data[Key]="key";data[Criteria D]="W");"Key";"Note Key")
 
Hope this will help. 🙂

Hey @Thim, thanks for the input.  Following all the logic for "Key", the first set of conditions, with "or" in its own line, followed by the second condition, worked like a charm.  Thanks and best, mibu.

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