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
patrickmlsk
Frequent Visitor

New column (true/false) based on filter in multiple columns

Dear all,

 

I want to add a new column to a table based on multiple drivers. What I want to do is: A new column with a TRUE or FALSE value. The determining factor is the e-mail address and I want a true/false column in return if the e-mail adress checks two true/false columns (not in the same row).   So basically the formula needs to check whether the email exists a second time and whether it checks both true/false columns. It can only check one true/false column in one row.

 

I hope that this is somehow a clear description of my problem.

 

Thanks for the help!

1 ACCEPTED SOLUTION
Michiel
Resolver III
Resolver III

I don't understand your issue with two True/False columns, but the way to refer to another row is something like this:

(Number of rows with same email) =
VAR ThisEmail = [Email]
RETURN
COUNTROWS(FILTER(Table1, Table1[Email] = ThisEmail) )

 

Basically, you filter down the whole table by some requirement that you get from the values in the current row. You cannot directly address another row. The above can be done with EARLIER() instead of a variable, but this is more readable, I think.

View solution in original post

1 REPLY 1
Michiel
Resolver III
Resolver III

I don't understand your issue with two True/False columns, but the way to refer to another row is something like this:

(Number of rows with same email) =
VAR ThisEmail = [Email]
RETURN
COUNTROWS(FILTER(Table1, Table1[Email] = ThisEmail) )

 

Basically, you filter down the whole table by some requirement that you get from the values in the current row. You cannot directly address another row. The above can be done with EARLIER() instead of a variable, but this is more readable, I think.

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.