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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
fazza1991
Helper II
Helper II

PowerQUery Find First Value greater than 0

Hi,

 

I am trying to exclusively use Power Query to find the first value in a row greater than greater than 0 

 

Tried the below but doesnt work

List.RemoveNulls(List.RemoveFirstN(Record.ToList(_)),3){0}

 

The column i want to start looking from is after 3

 

Thanks

2 ACCEPTED SOLUTIONS
AlienSx
Super User
Super User

Hi, @fazza1991 

    List.Select(
        List.RemoveFirstN(Record.ToList(_), 3),
        (x) => x > 0
    ){0}

View solution in original post

didnt work - keep getting error

 

Managed to get it to work using this insteatry

 

try List.Select( List.RemoveFirstN(Record.ToList(_), 3), (x) => x > 0 ){0}  otherwise 0)

 

THank you though.. first part of the solution worked a treat

 

 

View solution in original post

4 REPLIES 4
AlienSx
Super User
Super User

Hi, @fazza1991 

    List.Select(
        List.RemoveFirstN(Record.ToList(_), 3),
        (x) => x > 0
    ){0}

Thanks for this. Almost there.

One last thing as i still get errors for those that have 0 across the entire row.

If there is no value greater than 0 how would i do it so its just 0

 

e.g. code above with iferror then 0

    List.Select(
        List.RemoveFirstN(Record.ToList(_), 3),
        (x) => x > 0
    ){0} ? ?? 0

didnt work - keep getting error

 

Managed to get it to work using this insteatry

 

try List.Select( List.RemoveFirstN(Record.ToList(_), 3), (x) => x > 0 ){0}  otherwise 0)

 

THank you though.. first part of the solution worked a treat

 

 

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.