Results 1 to 10 of 10

PQ problem with null value validation

Threaded View

  1. #1
    Forum Contributor
    Join Date
    04-30-2010
    Location
    Denmark
    MS-Off Ver
    Office 365
    Posts
    215

    PQ problem with null value validation

    Hi all

    I do a lot of validation, for instance checking if 2 columns are equal, and if not I list the differences in a conditional column. So lets say I have a table like below
    nullcheck0.png


    If Column1 and Column2 are not equal, I want to show content of Column1, Column2 and Column3 in a new Check column. I do that with this code for the Check column:
    = Table.AddColumn(#"Replaced Value", "Check", each if [Column1] <> [Column2] then [Column1] & [Column2] & [Column3] else null)
    So this would be my expected result in that column:
    nullcheck1.png

    Problem is that if one of the columns I want to show content from contains a null, then it does not show anything as it all evaluates to null, see first row :
    nullcheck2.png

    How can I get the differences listed regardless of whether some of the columns contains a null?

    Bonus question: It seems PQ is not very consistant about nulls and blanks, when it comes to functions like merge etc. Some functions seems to be default null, while others are default blanks. This is also the case with different column types, like number and text. I was not aware of this, when I started using PQ, which means I now have a lot of different data, where some columns contains null, while others contain blanks. I realize that in some cases you do need to differ null from blank, but what are the general best practice about this - is it something like always replacing null with blank (or vice versa) after doing your steps, so data becomes consistant or is there another way of handling this?

    Best regards
    Imbizile
    Attached Files Attached Files

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Null validation cells help
    By abdullahsikandar in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-12-2014, 10:38 AM
  2. [SOLVED] NULL (blank) problem
    By amt7565 in forum Excel Formulas & Functions
    Replies: 15
    Last Post: 02-08-2014, 09:06 AM
  3. Input box validation for null value!
    By devpp in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-23-2013, 12:23 PM
  4. Validation list - not null
    By m.cain in forum Excel General
    Replies: 9
    Last Post: 06-27-2012, 04:56 PM
  5. if null, then formula problem
    By hrclark in forum Excel General
    Replies: 4
    Last Post: 10-17-2011, 11:29 AM
  6. [SOLVED] data validation and null text
    By Scarababau in forum Excel General
    Replies: 3
    Last Post: 03-31-2006, 09:40 AM
  7. IF IS NULL PROBLEM
    By Teri in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-25-2005, 05:06 PM
  8. IIF IS NULL Problem
    By scott in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 01-03-2005, 10:06 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1