Forum Discussion

RaMiRo87's avatar
RaMiRo87
Frequent Visitor
2 years ago
Solved

Dynamic y-axis bar chart - prevent data labels from overlapping

Hi folks,   I have a problem with overlapping data labels in my bar charts and need urgently help!  My problem is certainly of a rather simple nature, but I have not yet been able to find a 100% s...
  • amitchandak's avatar
    2 years ago

    RaMiRo87 , Ideally it should adjust , if you are using field parameters to switch measures

     

    else create min and max like

     

    min = minx(Values([Legal Enity), [Your measure] )*.9

     

    max = maxx(Values([Legal Enity), [Your measure] )* 1.1

     

     

    and use them in Y-axis Min/Max values  

  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi, RaMiRo87 

    You can define a measure of the maximum value of the Y-axis, which depends on the field or measure used by your Y-axis. I created a sample as follows:

    At this point, 900 is inside the column, and here are the steps to adjust it:

    Visual>>Y-axis>>Turn off Logarithmic scale

    Create a measure based on the field or measure you use on the Y-axis. The purpose of the entire maximum value is to allow the maximum value to be displayed on the Y axis higher than your actual maximum value.

    Max y-axis = [Sum of sales]*1.1 

    Click Maximum fx

    In your case, your DAX expression should look something like this:

    MaxValue =
    CALCULATE (
        MAX ( 'fcontrolling'[Incoming Orders] ),
        ALLSELECTED ( 'fcontrolling' )
    ) * 1.1
    

     

     

     

    How to Get Your Question Answered Quickly

    If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

    Best Regards

    Jianpeng Li

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.