Forum Discussion

NickProp28's avatar
NickProp28
Post Partisan
3 years ago
Solved

switch SEARCH

Dear community,      I have customer codes concatenated into one and form customer list, now I would like to determine if the list will have these customers. 'AAA' , 'BBB', 'CAC' ,'CCC' , '...
  • TomMartens's avatar
    3 years ago

    Hey NickProp28 ,

     

    I recommend using Power Query instead of creating a calculated column with DAX.

    Here you will find a pbix file that contains an example using Power Query: https://tommartens-my.sharepoint.com/:u:/g/personal/tom_minceddata_com/Ef26aLnUwbJNk4CBMmb6hzUBH5CLTgk7US0Ld3bNPBDZpQ?e=cnKUEX

    The above solution is based on two tables, one containing all the "possible values" and one where these possible values might appear.

    I consider using Power Query more appropriate as a calculated DAX column will not be as much compressed as native or Power Query columns during data load/data refresh.
    Another advantage is that the table containing the possible values can easily be adapted.

    Hopefully, this provides what you are looking for.

     

    Regards,

    Tom