Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago
Solved

Y axis Constant Line

Is it possible to add a Y axis constant line in a combo chart (line and clustered column). Whenever I am trying to add a constant line I am getting the option of X-axis constant line only. Please assist.

  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi,Jihwan_Kim 

    thanks for your concern about this issue. 

    Your answer is excellent! 

     

    Hi,Anonymous 

    I am glad to help you. 

    According to your description, you want to know why you are trying to add a constant line you are getting the option of X-axis constant line only? 

    If I understand you correctly, then you can refer to my solution. 

     

    I'm sorry to tell you that after my repeated tests, I can't get the results you want in Power BI, because the values of your two line charts are not standardized metrics: one takes the value of the bar chart and the other takes the value of the percentage. 

      

    So I assumed a Measure when testing, which is what I got from the test: 

     

     

     

    I hope my suggestions give you good ideas, if you have any more questions, please clarify in a follow-up reply.


    Best Regards,
    Fen Ling,


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

3 Replies

  • Hi,

    One of ways is to create a measure for the constant line.

    I do not know how your semantic model looks like, but I tried to create a sample pbix file like below.

    Please check the below picture and the attached pbix file.

     

     

     

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Kim,

    Thank you for the quick reply.
    Is the same possible for the following dataset.

    The chart can be done in excel. But in power bi this constant line is seemed to be a little tough. For the time being I can use error bar for the sake of visualization purpose only. Please check with the following data...Thank you.

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi,Jihwan_Kim 

    thanks for your concern about this issue. 

    Your answer is excellent! 

     

    Hi,Anonymous 

    I am glad to help you. 

    According to your description, you want to know why you are trying to add a constant line you are getting the option of X-axis constant line only? 

    If I understand you correctly, then you can refer to my solution. 

     

    I'm sorry to tell you that after my repeated tests, I can't get the results you want in Power BI, because the values of your two line charts are not standardized metrics: one takes the value of the bar chart and the other takes the value of the percentage. 

      

    So I assumed a Measure when testing, which is what I got from the test: 

     

     

     

    I hope my suggestions give you good ideas, if you have any more questions, please clarify in a follow-up reply.


    Best Regards,
    Fen Ling,


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