Forum Discussion
Dhrutivyasa-070
Helper I
3 years agoNeed to Create New Column using Combination of multiple row with same Code
Hello Users, I need to create one custom column using Power Query / DAX as per below images, i have one column conatins code against each item Name in result i need one column that conatins only...
- 3 years ago
Hi Dhrutivyasa-070 you can create NEW table in Power BI as following:
TableCombo = ADDCOLUMNS (VALUES ( Sheet7[Code] ),"Qty", [M_Qty],"Item (Combo)",CONCATENATEX (CALCULATETABLE ( VALUES ( Sheet7[Item] ) ),Sheet7[Item]," + ",Sheet7[Item],ASC))TableCombo - is name of NEW tableSheet7 you should adjust to your tableM_Qty = SUM(Sheet7[Qty]) - this is measure which you should create so table above is workingOriginal reference to this solution: https://dax.guide/concatenatex/Output should be like on picture belowI hope this help
some_bih
Community Champion
3 years agoHi Dhrutivyasa-070 you can create NEW table in Power BI as following:
TableCombo = ADDCOLUMNS (
VALUES ( Sheet7[Code] ),
"Qty", [M_Qty],
"Item (Combo)",
CONCATENATEX (
CALCULATETABLE ( VALUES ( Sheet7[Item] ) ),
Sheet7[Item],
" + ",
Sheet7[Item],
ASC
)
)
TableCombo - is name of NEW table
Sheet7 you should adjust to your table
M_Qty = SUM(Sheet7[Qty]) - this is measure which you should create so table above is working
Original reference to this solution: https://dax.guide/concatenatex/
Output should be like on picture below
I hope this help
- Dhrutivyasa-0703 years ago
Helper I
Thanks for the solution, it worked for me!