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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
abanar2
Helper I
Helper I

Visual Calculations: formatting percentages on the Line y-axis

Hello Everyone,

 

I have an interesting question about using visual calculations as percentages on a line chart in Power BI.

 

I prepared a sample data table that includes the period as year-quarter ("YYYY-QQ"), the name of the site, and the result.

In my use case, I would like to add constant lines for the bonus levels.

However, as you can see, the data labels aren't consistent. For the results, I am showing percentages, but for the bonus levels, I show decimal numbers.

abanar2_0-1743498223423.png

I found that the FORMAT function can help me change the decimals to percentages in the visual calculation. I used the following formula: 

FORMAT(<number>, "0%")

Unfortunately, I experienced that Power BI cannot place these formatted percentages on the line axis. Even though the visual calculation pop-up recognizes that the percentage isn't text (you can see that it aligns the numbers to the right while the text is aligned to the left), it cannot handle this on the visualization.

 

abanar2_1-1743498789283.png

 

Do you know about this limitation in Power BI? Does it mean I cannot use visual calculations for this purpose?

 

1 ACCEPTED SOLUTION

Hi @v-nmadadi-msft,

 

The answer is that the visual calculation's numerical result (both decimal and whole numbers) can be formatted as a percentage, but this is done through the selected visual's format bar, not with a script or formula.

To do this:

  1. Select the visualization
  2. Go to the Data format menu on the Format bar
  3. Under "Apply settings to" select the desired column
  4. In the "Format options" choose either whole number or decimal
  5. Finally, select the percentage option in the Format section

It may seem more complicated in writing than it actually is to perform.

Thank you for your help.

View solution in original post

9 REPLIES 9
abanar2
Helper I
Helper I

I entered the data into the Power BI Desktop. This is just random generated data so there is no sensitive in it. This is the only table in my semantic model.
Year-QuarterSITE_NameResult

2023-Q1SITE_10.73
2023-Q2SITE_10.78
2023-Q3SITE_10.78
2023-Q4SITE_10.86
2024-Q1SITE_10.91
2024-Q2SITE_10.95
2024-Q3SITE_10.85
2024-Q4SITE_10.87
2025-Q1SITE_10.72
2023-Q1SITE_20.92
2023-Q2SITE_20.70
2023-Q3SITE_20.84
2023-Q4SITE_20.90
2024-Q1SITE_20.86
2024-Q2SITE_20.72
2024-Q3SITE_20.88
2024-Q4SITE_20.97
2025-Q1SITE_20.83
2023-Q1SITE_30.94
2023-Q2SITE_30.91
2023-Q3SITE_30.86
2023-Q4SITE_30.94
2024-Q1SITE_30.92
2024-Q2SITE_30.77
2024-Q3SITE_30.93
2024-Q4SITE_30.84
2025-Q1SITE_30.95

like this?

lbendlin_0-1744122799338.png

 

Yes, I had a similar use case in my initial post.
So, my question is: how can I represent these percentage values from the visual calculations in a graph (eg. on a line)?

Hi @abanar2 ,

Visual calculations currently have a limitation: you cannot set a dynamic format string on a visual calculation, nor can you use a visual calculation as the dynamic format string for a field or measure.
Reference for the above point: Using visual calculations in Power BI Desktop - Power BI | Microsoft Learn

vnmadadimsft_0-1745323341304.png

 

If you find this post helpful, please mark it as an "Accept as Solution" and consider giving a KUDOS. Feel free to reach out if you need further assistance.
Thanks and Regards

Hi @v-nmadadi-msft,

 

The answer is that the visual calculation's numerical result (both decimal and whole numbers) can be formatted as a percentage, but this is done through the selected visual's format bar, not with a script or formula.

To do this:

  1. Select the visualization
  2. Go to the Data format menu on the Format bar
  3. Under "Apply settings to" select the desired column
  4. In the "Format options" choose either whole number or decimal
  5. Finally, select the percentage option in the Format section

It may seem more complicated in writing than it actually is to perform.

Thank you for your help.

Hi @abanar2,

We really appreciate your efforts and for letting us know the update on the issue.
Please accept your reply as the solution so as to help other community members who may come across the same issue in the future.

Please continue using fabric community forum for your further assistance.
Thank you

 

lbendlin
Super User
Super User

Even though the visual calculation pop-up recognizes that the percentage isn't text

it is text, but it is right aligned text.

I see, thank you for the correction.
Do you have any idea how to show the visual calculation result as percentage? 

Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
Do not include sensitive information. Do not include anything that is unrelated to the issue or question.
Please show the expected outcome based on the sample data you provided.

Need help uploading data? https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...
Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...

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!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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 Solution Authors
Top Kudoed Authors