cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ngut47
Frequent Visitor

Measure to concanate a column with string

Hello,

 

I have a column (with categories) 

Example

AAA
BBB
CCC
DDD
EEE

And i would like to create a measure that adds a string after each line. E.g. "in %", like a sufix

AAA in %
BBB in %
CCC in %
DDD in %
EEE in %

 

Is it possible? 

 

Thank you

9 REPLIES 9
v-polly-msft
Community Support
Community Support

Hi @ngut47 ,

It seems the connection mode you are using is live connection.  So until now, this is the only way you can  use  to add a string. 

You add a text string. So the format cannot be converted to data .

  • Create a measure.

 

 

 

Measure = "in %" &MAX('Table'[num])

 

 

 

11.PNG

 

 

Best Regards

Community Support Team _ Polly

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @ngut47 ,

I have modified my answer. Please check if your needs are met.

 

Best Regards

Community Support Team _ Polly

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

bcdobbs
Super User
Super User

Really depends what you want to use the measure for. For example I don't think you can slice by a measure or use it in a row or column field.

 

You could enable the direct query for power bi datasets in the preview features and create a composite model which will let you add a column:

 

https://docs.microsoft.com/en-us/power-bi/connect-data/desktop-directquery-datasets-azure-analysis-s...

 

https://m.youtube.com/watch?v=g-nRxDVt3To



Ben Dobbs

LinkedIn | Twitter | Blog

Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!
ngut47
Frequent Visitor

I would like to put it to rows and next to each category (including " %") have a column with numbers.

AAA in %25
BBB in %2
CCC in %54
DDD in %56
EEE in %6

Something like this

smpa01
Super User
Super User

@ngut47  the measure would be

Measure = MAX(tbl[c1])&" in %"





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!






New Animated Dashboard: Sales Calendar


ngut47
Frequent Visitor

That would only add the string to the last line of the column not? 

@ngut47 this will add that prrfix to each string





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!






New Animated Dashboard: Sales Calendar


bcdobbs
Super User
Super User

Hi,

I think you want a calculated column rather than a measure.

 

Following DAX will do what you need:

 

New Column = Table[Original Column] & " in %"



Ben Dobbs

LinkedIn | Twitter | Blog

Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!
ngut47
Frequent Visitor

I have a limited dataset, I canť see data or add any additional columns into tables. Only measures is possible to create. 

 

So I´m curious if this works for any measures? 

Helpful resources

Announcements
May 23 2022 epsiode 5 without aka link.jpg

The Power BI Community Show

Welcome to the Power BI Community Show! Jeroen ter Heerdt talks about the importance of Data Modeling.

charticulator_carousel_with_text (1).png

Charticulator Design Challenge

Put your data visualization and design skills to the test! This exciting challenge is happening now through May 31st!

Power BI Dev Camp Session 22 with aka link 768x460.jpg

Check it out!

Mark your calendars and join us on Thursday, May 26 at 11a PDT for a great session with Ted Pattison!

Power BI Release May 2022 768x460.png

Check it out!

Click here to read more about the May 2022 updates!