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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Anonymous
Not applicable

Changing the number format for legend label

I have an on-premise tabular model with a fact/date table.  The date table has a Year column displaying years as 2014, 2015.

 

When I create a line chart on Power BI.com and add the Year column from the date table to the Legend it displays as 2,014.0

 

How can I change the legend formatting with the Power BI service?

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi

 

I solved this problem.    A little background.  The field was a calculated field (tabular) for FiscalYear.  In Tabular and SSMS the appearance of the number was fine.    In Power BI Desktop & Service the number changed to 2,015.00.  The reason is because in Tabular the property of the columns for Data Format was Auto.  I suppose Power BI is trying to be helpful.  When I set the format to Whole Number and redeployed the problem went way. 

 

Thanks for your help.

 

View solution in original post

5 REPLIES 5
HarrisMalik
Continued Contributor
Continued Contributor

@Anonymous The type of axis is Continious your have change it to Categorial to get Year values. 

 

Step By Step:

 

1. Select the chart which is showing Continious values for years

2. In the right pane go to Format tab

3. Open the axis which has Years suppose it is X-axis

Change the property Type from Continious to Categorial

 

Cheers

Harris

Anonymous
Not applicable

This doesn't work.  In any case the Year is on the Legend (series) rather than the X Axis.

@Anonymous Can you please share a screen shot

Anonymous
Not applicable

Hi

 

I solved this problem.    A little background.  The field was a calculated field (tabular) for FiscalYear.  In Tabular and SSMS the appearance of the number was fine.    In Power BI Desktop & Service the number changed to 2,015.00.  The reason is because in Tabular the property of the columns for Data Format was Auto.  I suppose Power BI is trying to be helpful.  When I set the format to Whole Number and redeployed the problem went way. 

 

Thanks for your help.

 

@Anonymous Good that you found the solution. Please mark the post as answered so others can benfit from it.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.