Results 1 to 11 of 11

Power query zero versus null in calculaton

Threaded View

  1. #1
    Forum Contributor
    Join Date
    08-03-2021
    Location
    London
    MS-Off Ver
    365
    Posts
    633

    Power query zero versus null in calculaton

    Hi I have a question regarding the use of null,

    if I have N columns containing numbers and zeros and multiply them I end up with 0 , all good,
    but if I want he 0's ignored I can change these to null values and then,

    List.Product({[Number], [One], [Two], [Three]}), type number)
    but have tried an accumulation;

     Table.AddColumn( Source, "new",  each 
     List.Accumulate( ColNames, 0, (S,C)=> 
     S + Record.Field( MMM {0} , C ) * Record.Field(_, C) * [Number] ) )
    in the above each column contains 1 or 0 , and another table values 2,3,4, and this works, but if I change the 0's to nulls
    any row containing a null returns a total of null?
    Why does this happen,

    I have attached the sheet with bot versions, I have a further questing regarding null but will leave that for later.

    Richard
    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. Replies: 2
    Last Post: 07-14-2023, 08:21 AM
  2. [SOLVED] Power Query - Replacing null values
    By daithy in forum Excel General
    Replies: 20
    Last Post: 01-20-2023, 04:24 AM
  3. [SOLVED] Delete null cells in Power query
    By Undo in forum Excel General
    Replies: 9
    Last Post: 06-19-2022, 02:01 PM
  4. [SOLVED] Need help- Power Query Merge function return null value!
    By marvin-tech in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 02-14-2022, 12:23 PM
  5. [SOLVED] Replace duplicates with null by power query
    By siddiqsh in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 07-20-2020, 04:38 AM
  6. Power Query Merge Columns if Not Null
    By brent_milne in forum Excel General
    Replies: 1
    Last Post: 01-26-2020, 11:41 AM
  7. How to remove null values from several columns with Power Query?
    By toblju in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-12-2016, 11:08 AM

Tags for this Thread

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