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

Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more

Reply
Anonymous
Not applicable

change type of measure that is concatenated with a text

I have a simple sum of the measure and to that extent I concatenate it with a text:


Pay Remains pay = "paid R$" & FORMAT (sum (Facts [Vl_Pago (Remains)]) - sum (Facts [Vl_Estornado (Remains)]) - sum (Facts [Vl_Devolvido (Remains)]);. "# ## 0 ")

 

if I do not concatenate the values I can not change the data type to concatenate but the option is disabled, how can I solve this?

 

Untitled1.png

6 REPLIES 6
Greg_Deckler
Super User
Super User

I may not understand your question completely but I will give it a shot. Once something is Text, all of those options should be grey'ed out because they only apply to numbers. What is it that you want to end up with? A number or text?



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

@Anonymous In order to get 2 decimal places, you should change your formula to something like:

 

Pay Remains pay = "paid R$" & FORMAT (sum (Facts [Vl_Pago (Remains)]) - sum (Facts [Vl_Estornado (Remains)]) - sum (Facts [Vl_Devolvido (Remains)]);. "Currency")

or

 

Pay Remains pay = "paid R$" & FORMAT (sum (Facts [Vl_Pago (Remains)]) - sum (Facts [Vl_Estornado (Remains)]) - sum (Facts [Vl_Devolvido (Remains)]);. "# ## .00 ")

Your language settings may make you have to use "# ##,00" instead of "# ##.00". Here are the links that explain the FORMAT function and formats:

 

https://msdn.microsoft.com/en-us/library/ee634924.aspx

https://msdn.microsoft.com/en-us/library/ee634561.aspx

https://msdn.microsoft.com/en-us/library/ee634206.aspx



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

@Greg_Deckler @Sean

 

it does not matter, because what matters is to present the calculated value concatenated with the word "Paid" and the data type number is of type money to two decimal places

 


I tried this however is error
Pay Remains pay = "paid R $" & FORMAT (sum (Facts [Vl_Pago (Remains)]) - sum (Facts [Vl_Estornado (Remains)]) - sum (Facts [Vl_Devolvido (Remains)]), "# ##. 0 ")

I'm guessing that your regional language settings are going to require a ";" instead of a "," in your formula, which is why you are getting the error. Is the problem with your original formula that it does not go to 2 decimal places, as in Sean's image?



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...
Sean
Community Champion
Community Champion

@Anonymous The formula looks good.

See Picture

Text Measure2.png

 

Sean
Community Champion
Community Champion

@Anonymous try changing the ; to , before "#.##")

Helpful resources

Announcements
Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

April2025 Carousel

Fabric Community Update - April 2025

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

Top Solution Authors