Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more
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?
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?
@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
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?
@Anonymous The formula looks good.
See Picture
@Anonymous try changing the ; to , before "#.##")
User | Count |
---|---|
101 | |
69 | |
58 | |
47 | |
47 |