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

Try your skills in the Power BI Dataviz World Championship! Round one ends June 26. Join now

Reply
hemakrishnamoor
Frequent Visitor

Changing Axis values in Bar chart and Legend values in Pie chart on a live connection

Hi,

 

I am using a live connection to a semantic model and hence calculated column or data table is out of the question. 

 

1. I have a bar chart where I have long names for axis values in a bar chart and I want to change them to abbreviated names (For example, display WBDC instead of Women's Business Development Center). If I create a measure using SWITCH statement, I am not able to use measures there. I can not add a column. So, how do I do that as it is cluttering the bar chart.

 

2. I have a pie chart which has legends like > 1 Million, 1 to 5 Million, etc. I want to change them to > 1M, 1M to 5M, etc. How to change the legend labels?

 

Would really appreciate any help. 

 

1 ACCEPTED SOLUTION

Hi @hemakrishnamoor,

 

Thank you for the response, currently power bi does not support renaming axis or legend category values at the report level when using a pure live connection. The only supported approach is to have the values added in the semantic model and use those fields in the visuals.

If changes to the semantic model are not possible, then there is currently no supported way to rename those values directly within the report.

 

Thank you for being part of Microsoft Fabric Community.

 

Thanks and regards,

Anjan Kumar Chippa

 

 

View solution in original post

15 REPLIES 15
danextian
Super User
Super User

You will have to use measures since you can't create a calculated column of abbreviated names. Each measure filters a value to a specific category.  You will of course have to manually create another measure with each new category added. 





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

Measures can not be used as an axis to create a bar chart. It has to be a column. so, that is not a possible solution. 

Hans-Georg_Puls
Super User
Super User

You can use the same solution I mentioned for the pie chart to define y-axis labels based on a disconnected table and a measure.

I would need help in defining the disconnected tabe and measure to go with it.  Pls also note that this is a live connection and not Direct query. 

 

If your live connection is a connection to a Power BI semantic model it should be possible to add local data like tables and measures. You will have a composite model then. As soon as you try adding something local Power BI will ask you if you really want that.

 

To create the table do the following:

  1. Modeling->New Table
  2. Define the table based on this pattern:
    My Categories =
    DATATABLE (
        "Category", STRING,
        "Sort By", INTEGER,
        {
            { "Cat. 1", 1 },
            { "Cat. 2", 2 },
            { "Cat. 3", 3 }
        }
    )
  3. Change the category names and sort by values according to your needs
  4. Select the Category column in data view and go to Columns tools -> Sort by column
  5. Select Sort By as Sort By column

     

To create the measure, do the following:

  1. Modeling -> New measure
  2. Define the measure based on this pattern
    Values based on my categories =
       SWITCH ( SELECTEDVALUE ( 'My Categories'[Category] ),
          "Cat. 1",  [Your Measure for Cat. 1],
          "Cat. 2",  [Your Measure for Cat. 2],
          "Cat. 3",  [Your Measure for Cat. 3],
           BLANK()
    )

     

 

Finally assign 'My Categories'[Category] and [Values based on my categories] to your chart visual.

 

Hope that works for you and with your live connection!

 

For me, Modeling -> New Table is disabled. 

Hi @hemakrishnamoor,

 

Thank you for reaching out to Microsoft Fabric Community.

 

Thank you @Hans-Georg_Puls for the prompt response.

 

If the Modeling --> New Table option is disabled, then the report is using a pure live connection and local tables or measures cannot be created.

  • In this case, the axis labels and pie chart legend labels cannot be renamed directly in the report. The names need to be created in the semantic model itself.
  • Please ask the semantic model owner to add separate abbreviated columns with shortened names and use those columns in the visuals.

 

Thanks and regards,

Anjan Kumar Chippa

Hi @hemakrishnamoor,

 

As we haven’t heard back from you, we wanted to kindly follow up to check if the solution I have provided for the issue worked? or let us know if you need any further assistance.

 

Thanks and regards,

Anjan Kumar Chippa

Hi @hemakrishnamoor,

 

We wanted to kindly follow up to check if the solution I have provided for the issue worked? or let us know if you need any further assistance.

 

Thanks and regards,

Anjan Kumar Chippa

I had asked the solution in case of Live semantic model and the solution that was provided to use disconnected table, which is not possible in live semantic model. So, as of now, there is no solution.

Hi @hemakrishnamoor,

 

Thank you for the response, currently power bi does not support renaming axis or legend category values at the report level when using a pure live connection. The only supported approach is to have the values added in the semantic model and use those fields in the visuals.

If changes to the semantic model are not possible, then there is currently no supported way to rename those values directly within the report.

 

Thank you for being part of Microsoft Fabric Community.

 

Thanks and regards,

Anjan Kumar Chippa

 

 

Hi @hemakrishnamoor,

 

As we haven’t heard back from you, we wanted to kindly follow up to check if the response I have provided for the issue worked? or let us know if you need any further assistance.

 

Thanks and regards,

Anjan Kumar Chippa

Hans-Georg_Puls
Super User
Super User

Hi @hemakrishnamoor , concerning your pie chart question I would suggest

  1. Define a disconnected table with a legend column to define the legend (=category) values you need
  2. Define a measure that calculates the values per category based on your newly defined table
  3. Assign the newly defined legend column as legend to your pie chart
  4. Assign the newly defined measure as Values to your pie chart

That should work.

 

Do you need assistance defining the table or measure?

Hans-Georg_Puls
Super User
Super User

Hi @hemakrishnamoor ,

at least for the bar chart I might have a solution for you:

  1. Disable values for y-axise
  2. Enable Data labels
  3. Choose Inside base or what ever you like as position
  4. Enable Value and assign your measure

If you are fine with labels inside the bars that would be an easy solution.

I am not talking about axis labels for values at the top. I am asking abt axis values that are at the axis. 

Helpful resources

Announcements
Fabric Data Days is here Carousel

Fabric Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.