简体   繁体   中英

Power BI Report column format

I have 2 columns X and Y having comma separated values. I want to create a custom Column XY that will have data from both the strings in columns X and Y.

The below screenshot is the sample format in spreadsheet and need this to be achieved in the Power BI Report.

Sample Columns

I am new to Power BI. Do help me find a solution.

Thanks in advance

If you are simply looking to concatenate the fields, You can do that using the & operator:

Concat_Field = Table[column X] & "," & Table[Column Y]

If you want to pick alternative values from X and Y and if the there are always 4 values, you can use:

Column XY = 
        LEFT('Table'[Column X],2) & LEFT('Table'[Column Y],2) & 
        MID('Table'[Column X],3,2) & MID('Table'[Column Y],3,2) & 
        MID('Table'[Column X],5,2) & MID('Table'[Column Y],5,2) & 
        MID('Table'[Column X],7,2) & "," & MID('Table'[Column Y],7,2)

If the above two cases are not what you are looking for, then kindly provide additional details, so that we can help you out.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM