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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
ABAXA
New Member

Create new bool column depending on previous rows

I'm trying to create a new column named "Exists at least One time"

The output should be like shown in the table below.

 

ABAXA_0-1663860678405.png

I believe that the logic will be :

1- for each path, check how many occurence of the path in the table (AAAA = 3 times)

2- for each occurence, check the Exists column, if one is false "Exists a least One time" = FALSE else TRUE

 

How to implement this in power query or Power BI custom column ?

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @ABAXA ,

 

Here I suggest you to try this code to create a custom column in Power Query.

if 
Table.RowCount(
let _path = [Path] in
Table.SelectRows(#"Changed Type",each [Path] = _path and [Exist] = true)) = 0 
then
"false"
else
"true"

RicoZhou_1-1663917525119.png

Result is as below.

RicoZhou_0-1663917497125.png

 

Best Regards,
Rico Zhou

 

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
Anonymous
Not applicable

Hi @ABAXA ,

 

Here I suggest you to try this code to create a custom column in Power Query.

if 
Table.RowCount(
let _path = [Path] in
Table.SelectRows(#"Changed Type",each [Path] = _path and [Exist] = true)) = 0 
then
"false"
else
"true"

RicoZhou_1-1663917525119.png

Result is as below.

RicoZhou_0-1663917497125.png

 

Best Regards,
Rico Zhou

 

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

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors