How to Identify Rows with Missing Values using Power Query

Поділитися
Вставка
  • Опубліковано 13 січ 2025

КОМЕНТАРІ • 47

  • @AccessAnalytic
    @AccessAnalytic  23 дні тому +1

    Let me know in the comments if this was useful or if you have another method?
    You might like to check out this Power Query video with 5 great Power Query Tips ua-cam.com/video/n08zD71J2K8/v-deo.htmlsi=j_fGLcdNwD_HOPL9&list=PLlHDyf8d156UFChHzgQIO2cdaNqOS8KX3

    • @BillSzysz1
      @BillSzysz1 23 дні тому +2

      Nice, Wyn👍..... but You don't need an extra column. Just use Table.SelectRows. Your second (and final) step might look like this:
      FilteredRows = Table.SelectRows(Source, each List.Contains(Record.ToList(_), null))
      Sometimes it is beneficial to use the List.ContainsAny or List.ContainsAll function.

    • @AccessAnalytic
      @AccessAnalytic  23 дні тому

      Cheers Bill 😀

    • @BillSzysz1
      @BillSzysz1 23 дні тому

      @@AccessAnalytic You're welcome 😀

  • @josh_excel
    @josh_excel 22 дні тому +1

    Good content, this is a great way to figure out how to create a custom function.

    • @AccessAnalytic
      @AccessAnalytic  22 дні тому +1

      Thanks for taking the time to leave a kind comment Josh.

  • @BlockFHatter
    @BlockFHatter 22 дні тому +1

    Thanks that is well explained and will be very useful.

  • @cherianiype
    @cherianiype 22 дні тому +1

    Very nice. Fast and easy and quick. Thanks Wyn

  • @buddhigupta3557
    @buddhigupta3557 23 дні тому +3

    Thank you for sharing!
    It can be done like this as well:-
    1. Get list of values - Record.FieldValues(_)
    2. Get not null count of values which should be less or equal to Column Count - List.NonNullCount(Record.FieldValues(_))
    3. Compare with Column Count to identify if row has missing values.
    if List.NonNullCount(Record.FieldValues(_)) < Table.ColumnCount(#"PreviousStepName") then "Missing" else "Not Missing"

  • @sledgehammer-productions
    @sledgehammer-productions 23 дні тому +3

    _ in PQ is like the @ in an Excel table, sort of. Today is a good day, I've learned something!

  • @garylhaas2005
    @garylhaas2005 21 день тому +1

    Thanks. First time I have understood how records can be used

  • @IvanCortinas_ES
    @IvanCortinas_ES 23 дні тому +1

    Nice solution. Thank you Wyn!!!

  • @moc61
    @moc61 23 дні тому +1

    As always from you, this is brilliant! Thanks for sharing

    • @AccessAnalytic
      @AccessAnalytic  23 дні тому

      Cheers Martin, I appreciate the kind comment.

  • @Sumanth1601
    @Sumanth1601 23 дні тому +2

    Awesome 😮 more such videos please 😊

    • @AccessAnalytic
      @AccessAnalytic  23 дні тому

      I appreciate you taking the time to let me know you found it useful

  • @SamFisher-x2y
    @SamFisher-x2y 23 дні тому +1

    Brilliant, thank you, sir!

  • @Bhavik_Khatri
    @Bhavik_Khatri 23 дні тому +2

    Very nice tutorial.

  • @JJ_TheGreat
    @JJ_TheGreat 23 дні тому +1

    Ah, this is brilliant! Thanks.

  • @garyflagray1092
    @garyflagray1092 23 дні тому +1

    Thanks Wyn.

  • @chrism9037
    @chrism9037 23 дні тому +1

    Thanks Wyn, very simple and straight-forward.

  • @ExcelWithChris
    @ExcelWithChris 21 день тому +1

    Great one, now also have a better idea of diff between record and list. Maybe a future video on how to use this change from record to list (or list to record) for other purposes?

    • @AccessAnalytic
      @AccessAnalytic  21 день тому

      Cheers Chris, I’m sure I’ll do a few more on the topic in the future.

  • @JJ_TheGreat
    @JJ_TheGreat 23 дні тому +1

    0:47 What about transposing the data first??

  • @flaviogarlatticosta
    @flaviogarlatticosta 18 днів тому +1

    Thanks Win for your interesting tutorial that gave me a cue to try the Record.FieldValues(_) function and with = Table.SelectRows(#"Changed type", each List.Contains(Record.FieldValues(_), null))
    It works, but I'm not sure . 🙂

    • @AccessAnalytic
      @AccessAnalytic  18 днів тому

      Yep, combining it all will work too. Good one.

  • @putta231178
    @putta231178 17 днів тому

    good .thanks

  • @alexbarbucristi
    @alexbarbucristi 23 дні тому +1

    Just used something similar to find where 6 specific columns are all null at the same time

  • @buddhigupta3557
    @buddhigupta3557 23 дні тому +1

    Below code will give new column with information which all columns have data blank:-
    let
    Source = Table,
    AddNullColumns = Table.AddColumn(Source, "Null Columns", each
    let
    NullColumns = List.Select(Table.ColumnNames(Source), (col) => Record.Field(_, col) = null)
    in
    Text.Combine(NullColumns, ", ")
    ),
    ChangeType = Table.TransformColumnTypes(AddNullColumns, {{"Null Columns", type text}})
    in
    ChangeType

    • @AccessAnalytic
      @AccessAnalytic  23 дні тому +1

      Nice, thanks Buddhi 😀

    • @osoriomatucurane9511
      @osoriomatucurane9511 22 дні тому +1

      Awesome trick. I guess, the last step, change types, it could be included in the AddColumn( ) as the last argument what could result in a lesser convulsive and much more readable code.