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

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

Reply
powertechbi
Frequent Visitor

Formatting table values

Goodnight.

I have a question, thank you in advance for your attention.
Anyway, I'm creating a table that will show results per month from 4 measures: revenue, cost, profit and quantity sold. I want to switch between absolute and percentage values. I created the formulas, which are working for me, the problem is that the values ​​are not appearing in the graph with the formatting. I need the absolute values ​​to be: R$ before the value and the percentage values ​​to have the % symbol at the end of the values.
Any suggestions on how I can do it?
I'm adding images of the dashboard.
Again, thank you.duvida3.jpgduvida2.jpg

4 REPLIES 4
powertechbi
Frequent Visitor

@ahadkarimi 

 

I try used this, but I tried to do as you suggested, but as shown in the image below, the columns and values ​​disappear in the chartduvida 4.jpg

Anonymous
Not applicable

Hi @powertechbi ,

 

This is because this measure outputs text, and Bar chart cannot accept text values.

You can still use the previous formula in the Bar chart. Then use this format measure here.

vcgaomsft_0-1724635821882.png

 

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly --  How to provide sample data in the Power BI Forum

lbendlin
Super User
Super User

you need to use FORMAT to convert the number into the desired text format. Note that this will mess with the sort order.   Please watch the August 2024 announcement about Visual Calculations formatting - that will likely help in your scenario  (when combined with Field Parameters)

ahadkarimi
Solution Specialist
Solution Specialist

Hi @powertechbi, give this a try, and if you encounter any issues, let me know.

 

Formatted Value = 
VAR _SelectMedida = SELECTEDVALUE(Select1[Select1 Pedido])
VAR _SelectTipoValor = SELECTEDVALUE(Tipo[Tipo Pedido])
VAR _Resultado = SWITCH(
    TRUE(),
    _SelectMedida = 0 && _SelectTipoValor = 1, [Receita Total], 
    _SelectMedida = 0 && _SelectTipoValor = 0, FORMAT([Receita % Mês] * 100, "0.00 %"),
    _SelectMedida = 1 && _SelectTipoValor = 1, [Lucro Total], 
    _SelectMedida = 1 && _SelectTipoValor = 0, FORMAT([Lucro % Mês] * 100, "0.00 %"),
    _SelectMedida = 2 && _SelectTipoValor = 1, [Custo Total], 
    _SelectMedida = 2 && _SelectTipoValor = 0, FORMAT([Custo % Mês] * 100, "0.00 %"),
    _SelectMedida = 3 && _SelectTipoValor = 1, [Quantidades Vendidas], 
    _SelectMedida = 3 && _SelectTipoValor = 0, FORMAT([Quantidade % Mês] * 100, "0.00 %")
)
RETURN
IF(_SelectTipoValor = 1, FORMAT(_Resultado, "R$ #,##0.00"), _Resultado)

 

 

Did I answer your question?  If so, please mark my post as the solution!
Your Kudos are much appreciated!  Proud to be a Resolver IV !

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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 Kudoed Authors