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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
sesa145093
Regular Visitor

Trouble creating a Concatenate Column

This is the string i have used in Excel: =IFERROR(IF([@Status]="(4) Completed",CONCATENATE([@DebriefYear],"_",[@Entity]),""),NA())

 

I have the same data in Power Bi I just cant figure out how to get either a custom column to do this or how to create a measure.

 

This is the Secon field i will need as well: =IFERROR(IF([@Status]="(4) Completed",IF((COUNTIFS([Entity Concat1],[@[Entity Concat1]])-COUNTIF($AF$2:$AF2,$AF2))=0,1,0),""),NA())

 

Thank you for your help!

 

 

 

3 ACCEPTED SOLUTIONS
edhans
Super User
Super User

For the first one @sesa145093 this will work:

if [Status] = "(4) Completed" then Text.From([Debrief Year]) & "_" & [Entity] else null

 

edhans_0-1613758784349.png

All Power Query if/then/else constructs are logically like Excel's IF() statement, but it is if/then/else with two requirements:

  • The keywords if, then, and else, are lower case.
  • You must have the else statement. If you don't need it, just use else null. Unlike IF() you cannot leave the else off.

As for your second question, we need data. I have no idea what is in AF2 or what you are trying to accomplish there.

How to get good help fast. Help us help you.

How To Ask A Technical Question If you Really Want An Answer

How to Get Your Question Answered Quickly - Give us a good and concise explanation
How to provide sample data in the Power BI Forum - Provide data in a table format per the link, or share an Excel/CSV file via OneDrive, Dropbox, etc.. Provide expected output using a screenshot of Excel or other image. Do not provide a screenshot of the source data. I cannot paste an image into Power BI tables.

 



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting

View solution in original post

Awesome!! Thanks for this!!

View solution in original post

You are welcome @sesa145093 - I hope you don't mind but I marked my answer as the solution since it had the working code. 😁

 

If you need help with the 2nd part of your question, you could start a new thread for just that including some sample data and expected results per the links in my post above.



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting

View solution in original post

3 REPLIES 3
edhans
Super User
Super User

For the first one @sesa145093 this will work:

if [Status] = "(4) Completed" then Text.From([Debrief Year]) & "_" & [Entity] else null

 

edhans_0-1613758784349.png

All Power Query if/then/else constructs are logically like Excel's IF() statement, but it is if/then/else with two requirements:

  • The keywords if, then, and else, are lower case.
  • You must have the else statement. If you don't need it, just use else null. Unlike IF() you cannot leave the else off.

As for your second question, we need data. I have no idea what is in AF2 or what you are trying to accomplish there.

How to get good help fast. Help us help you.

How To Ask A Technical Question If you Really Want An Answer

How to Get Your Question Answered Quickly - Give us a good and concise explanation
How to provide sample data in the Power BI Forum - Provide data in a table format per the link, or share an Excel/CSV file via OneDrive, Dropbox, etc.. Provide expected output using a screenshot of Excel or other image. Do not provide a screenshot of the source data. I cannot paste an image into Power BI tables.

 



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting

Awesome!! Thanks for this!!

You are welcome @sesa145093 - I hope you don't mind but I marked my answer as the solution since it had the working code. 😁

 

If you need help with the 2nd part of your question, you could start a new thread for just that including some sample data and expected results per the links in my post above.



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors