+ Reply to Thread
Results 1 to 3 of 3

Power Query Transform multiple columns

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

    Power Query Transform multiple columns

    Hi I have this to give a true of false for greater than a value;



    Please Login or Register  to view this content.
    This give a true or false for each value but I would like to incorporate turning to 1 and 0 , so I can use an if statement,

    I have then repeated the same construction on the out from the above;


    Please Login or Register  to view this content.

    But I'd like to get it all in one go, I've included workbook with what I've got so far.

    Richard.
    Attached Files Attached Files

  2. #2
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,211

    Re: Power Query Transform multiple columns

    Please try

    PHP Code: 
    let
        Source 
    Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
        
    Ans Table.TransformColumnsSource, {"Home",each _}, each if _>5 then "Greater" else "lesser" )
    in
        Ans 
    Attached Images Attached Images
    Attached Files Attached Files
    Last edited by Bo_Ry; 05-27-2023 at 12:07 PM.

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

    Re: Power Query Transform multiple columns

    I couldn't get your solution to work, I brought back the source table { "Home , each _} , but kept getting an error,
    but i did realize I was overcomplicating things and got this to work;

    Please Login or Register  to view this content.

    Do you know it it is possible to use an if statement on TRUE /FALSE as I could not which is why I converted them to number
    so if x = 1 then y else z , but I could not get anything from TRUE, "TRUE etc. I thought it might as in excel things like
    MATCH will ; MATCH(TRUE,H5#,0)

    i'll leave this open for a little longer and see if I get any further ways of tackling. thanks for the help.

    Richard.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Power Query: transform a table with sub-items.
    By T.I. in forum Excel General
    Replies: 9
    Last Post: 07-04-2022, 03:18 AM
  2. [SOLVED] Transform data in Power Query
    By no_Fate in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-19-2022, 06:25 AM
  3. Power query - transform help
    By N3CREN in forum Excel General
    Replies: 0
    Last Post: 10-23-2020, 09:01 AM
  4. [SOLVED] Power Query transform help
    By ierosadopr in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-09-2019, 05:25 AM
  5. Replies: 1
    Last Post: 03-12-2019, 04:42 PM
  6. Power Query (Get & Transform) on Mac
    By SHI.NL in forum Excel General
    Replies: 2
    Last Post: 05-18-2018, 09:24 AM
  7. Get & Transform (Power Query) not showing certain tables
    By BamBamMoneyBags in forum Excel General
    Replies: 0
    Last Post: 03-22-2017, 12:22 PM

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