Power BI Exchange

Please login or click SIGN UP FOR FREE to create your PowerBIUG account to join this user group.
 View Only
  • 1.  Turn one text column into multiple boolean columns

    Posted Dec 28, 2021 01:43 AM
    Hello everyone,

    i have an interesting problem to solve, preferably in Power Query, but any solution would be fine at this point :D

    My model has one column, that contains text. It shows in what products a part is used, but it isn´t ordered and you could find any number of products in there.

    So it could be "A; B; E; D" but also "C; A" etc.

    I want to take this columns and turn it into multiple boolean columns: Contains A, Contains B....

    Do you have any Idea for a quik solution?

    Thank you so much in advance!

    ------------------------------
    Norbert Empting
    ------------------------------


  • 2.  RE: Turn one text column into multiple boolean columns

    Posted Dec 29, 2021 10:47 AM
      |   view attached
    Dear Norbert,

    something like the file attached would be useful?

    Have a nice evening
    Matteo

    ------------------------------
    Matteo Agostini
    Consultant
    ------------------------------

    Attachment(s)

    pbix
    Boolean Columns.pbix   26 KB 1 version


  • 3.  RE: Turn one text column into multiple boolean columns

    Bronze Contributor
    Posted Dec 30, 2021 10:48 AM
    I like your solution but I have one question, what does the MAXX function do in your measure?

    ------------------------------
    Jeff Lynch
    Lynch Interactive
    7607291390
    ------------------------------