Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

How to combine 3 field into 1 ?

Hi All

 

I have below target Table , may i know how to combine below field into 1 :-

SOURCE , 

date_t

GROUP_

 

Expected result :-

Link field consist of "SINGAPORE 1 January 2010 GROUP_"

 

Below link is my PBI file :-

https://www.dropbox.com/s/hpoyek0iy2a91ne/TARGET_V001.pbix?dl=0

 

My raw data :-

 

SOURCEdate_tGROUP_ ODSE_target_sales 
SINGAPORE1 January 2010G1                100,000.00
SINGAPORE1 February 2010G1                100,000.00
SINGAPORE1 March 2010G1                100,000.00
SINGAPORE1 April 2010G1                100,000.00
SINGAPORE1 May 2010G1                100,000.00
SINGAPORE6 June 2010G1                100,000.00
SINGAPORE1 July 2010G1                100,000.00
SINGAPORE1 August 2010G1                100,000.00
SINGAPORE1 September 2010G1                100,000.00
SINGAPORE1 October 2010G1                100,000.00
SINGAPORE1 November 2010G1                100,000.00
SINGAPORE1 December 2010G1                100,000.00
    
SINGAPORE1 January 2010G2                175,000.00
SINGAPORE1 February 2010G2                175,000.00
SINGAPORE1 March 2010G2                175,000.00
SINGAPORE1 April 2010G2                175,000.00
SINGAPORE1 May 2010G2                175,000.00
SINGAPORE6 June 2010G2                175,000.00
SINGAPORE1 July 2010G2                175,000.00
SINGAPORE1 August 2010G2                175,000.00
SINGAPORE1 September 2010G2                175,000.00
SINGAPORE1 October 2010G2                175,000.00
SINGAPORE1 November 2010G2                175,000.00
SINGAPORE1 December 2010G2                175,000.00
2 ACCEPTED SOLUTIONS

@Anonymous 

 

Change your initial DAX formula (not Power Query) to the following one:

 

 

Column = 'TARGET'[SOURCE] & FORMAT('TARGET'[date_t], "DD MMMM YYYY") & 'TARGET'[GROUP_]

 

  

View solution in original post

Hi @Anonymous 

I used the GUI -> Add Column -> Custom Column

Phil



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


View solution in original post

13 REPLIES 13
PhilipTreacy
Super User
Super User

Hi @Anonymous 

Sorry, can't open your PBIX file because the data source is on your computer.

To do this in Power Query

 

 

= Table.AddColumn(#"Changed Type", "Custom", each [SOURCE] & " " & Date.ToText([date_t], "dd MMMM yyyy") & " GROUP_" & [GROUP_])

 

This will give you a string like SINGAPORE 1 January 2010 GROUP_G1

If you don't actually want the text GROUP_ in there, delete it from the line of code above so you just have

= Table.AddColumn(#"Changed Type", "Custom", each [SOURCE] & " " & Date.ToText([date_t], "dd MMMM yyyy") & " " & [GROUP_])

Phil 



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


Anonymous
Not applicable

Hi Philip

Can you share how to do it at PQ ?

Paul

Hi @Anonymous 

Here's an Excel file that cotains the data and query.  I haven't done a PBIX file because I'd need to share my source data file too.  You can just copy/paste the code into PBI.

Phil



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


Anonymous
Not applicable

Hi Philip

 

Mu PBI file 

https://www.dropbox.com/s/708rtbxrordiaiu/TARGET_V002.pbix?dl=0

 

I still get error :-

Paulyeo11_0-1604303298192.png

 

Hi @Anonymous 

Actually, here's your PBIX file.  I added the line of code to it but can't test because it's data source is on your computer.

Phil



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


Anonymous
Not applicable

Hi Philip

kinldy use ver 3 below file and add your script in :-

https://www.dropbox.com/s/phht2l4h8z5qbkk/TARGET_V003.pbix?dl=0

very sorry As the ver 1 i cannot reload 

Paulyeo11_0-1604303759920.png

 

Hi @Anonymous 

You had the last line of the query mixed up, it should just be

#"Added Custom" = Table.AddColumn(#"Changed Type", "Custom", each [SOURCE] & " " & Date.ToText([date_t], "dd MMMM yyyy") & " " & [GROUP_])

Here's the PBIX file

Phil 



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


Anonymous
Not applicable

Hi Philip

Thank you very much for your help  , it work fine now. May i know how you generate the Script ? 

Paulyeo11_0-1604305056006.png

 

Hi @Anonymous 

I used the GUI -> Add Column -> Custom Column

Phil



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


Anonymous
Not applicable

Hi Philip

Thank you 

Paul

amitchandak
Super User
Super User

@Anonymous , Try a new column like

new column = [SOURCE] & format(date_t,"DD MMMM YYYY") & [GROUP_]

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

Hi Amit

I get error msg :-

Paulyeo11_0-1604302422170.png

 

@Anonymous 

 

Change your initial DAX formula (not Power Query) to the following one:

 

 

Column = 'TARGET'[SOURCE] & FORMAT('TARGET'[date_t], "DD MMMM YYYY") & 'TARGET'[GROUP_]

 

  

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors