Forum Discussion

BIswajit_Das's avatar
BIswajit_Das
Icon for Impactful Individual rankImpactful Individual
2 years ago

POWER BI DAX

Hello

There's  a table with data

PCIDSEQRESRES2
1BIOAG
1IBOBH
2BIOCI
3BIOEL
3IBOFK

and i want to concate RES & RES2 for SEQ IN {"BIO"} ONLY PCID WISE
i.e
Required Column

RESULT
AG
CI
EL

Thanks & Regards..

7 Replies

  • RESULT = //try this
    CALCULATE(
        CONCATENATEX(
            FILTER(
                YourTable,
                YourTable[SEQ] = "BIO"
            ),
            YourTable[RES] & YourTable[RES2],
            ""
        ),
        ALLEXCEPT(
            YourTable,
            YourTable[PCID]
        )
    )
  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi BIswajit_Das ,

     

    You can try  below dax to create new table:

     

    CalculatedTable = 
    SUMMARIZE (
        'Table',
        'Table'[PCID],
        "RESULT",
        CALCULATE (
            CONCATENATEX (
                FILTER (
                    'Table',
                    'Table'[SEQ] = "BIO"
                ),
                'Table'[RES] & 'Table'[RES2],
                ""
            )
        )
    )

     

     

    if you want to use it in table column, try below dax:

    RESULT1 = 
    CALCULATETABLE (
        SELECTCOLUMNS (
            VALUES('Table'[PCID]),
            "RESULT",
            CONCATENATEX (
                FILTER (
                    'Table',
                    'Table'[SEQ] = "BIO" && 'Table'[PCID] = VALUES('Table'[PCID])
                ),
                'Table'[RES] & 'Table'[RES2],
                ""
            )
        )
    )

     

    Best Regards,
    Adamk Kong

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

  • VijayP's avatar
    VijayP
    Icon for Community Champion rankCommunity Champion

    BIswajit_Das Do you wish to have this column in the same table or separately. if it should be in the same table

    simple if function can help you to get the required column

    • BIswajit_Das's avatar
      BIswajit_Das
      Icon for Impactful Individual rankImpactful Individual

      Hello VijayP, Anonymous , mh2587   Thanks for reponding , It's an other calculated table where i want to get the column\

      • Anonymous's avatar
        Anonymous
        Not applicable

        Hi BIswajit_Das ,

         

        Does the formula I provided meet your requirements?

         

        Best Regards,
        Adamk Kong

         

        If this post helps, then please consider Accept it as the solution to help the other members find it more quickly