Forum Discussion
POWER BI DAX
Hello
There's a table with data
| PCID | SEQ | RES | RES2 |
| 1 | BIO | A | G |
| 1 | IBO | B | H |
| 2 | BIO | C | I |
| 3 | BIO | E | L |
| 3 | IBO | F | K |
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
- mh2587
Super User
RESULT = //try this CALCULATE( CONCATENATEX( FILTER( YourTable, YourTable[SEQ] = "BIO" ), YourTable[RES] & YourTable[RES2], "" ), ALLEXCEPT( YourTable, YourTable[PCID] ) ) - AnonymousNot 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 KongIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly
- VijayP
Community 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
Impactful Individual
- AnonymousNot applicable
Hi BIswajit_Das ,
Does the formula I provided meet your requirements?
Best Regards,
Adamk KongIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly