Forum Discussion

Kostas's avatar
Kostas
Icon for Helper IV rankHelper IV
6 years ago
Solved

Bar Char Visual formatting

Hello, 
I am still learning the Power BI and how I can take the most out of the visuals available. 

At the moment I do have a table that contain two different columns as seems below. Both columns have the same values available but it can have different value per code in each column. 

CodeRating 1Rating 2

2244

EffectiveNot Effective
2425Needs ImprovementNeeds Improvement
5233Needs ImprovementEffective

 

My end goal is to produce a bar chart that in the axis will contain the different rating values (e.g. effective, Needs Improvement, Not Effective) and it will have two columns to count the codes for each rating (see example below)

Is it possible to produce the specific graph? Ideally, I would prefer NOT to produce it with measures because I am using a table below that shows more information regarding the codes, that means that when the user will select the column or the x axis value the table will show the information regarding the codes. With a measure I will not be able to do that.

 

Thanks

Kostas

 

  • Anonymous's avatar
    Anonymous
    6 years ago

    Hi Kostas ,

     

    You will need to unpivot your columns.

     

    Select the code Column and then click on Unpivot Other Columns

     

     

     

     

    Youl will get the following table

     

     

    Then drag the columns to get the output.

     

     

     


    Regards,

    Harsh Nathani


    Appreciate with a Kudos!! (Click the Thumbs Up Button)

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

     

3 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Kostas ,

     

    You will need to unpivot your columns.

     

    Select the code Column and then click on Unpivot Other Columns

     

     

     

     

    Youl will get the following table

     

     

    Then drag the columns to get the output.

     

     

     


    Regards,

    Harsh Nathani


    Appreciate with a Kudos!! (Click the Thumbs Up Button)

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

     

    • Kostas's avatar
      Kostas
      Icon for Helper IV rankHelper IV

      Helloo Anonymous,

      It worked perfectly, seems like an easy solution just needed some out of the box thinking. 

      I got one more question, is it possible to specify the columns colour for each value in the x axis with a specific colour rather than specify only the type of the rating? 
      For example the two columns generated for effective to be green, the two colours for needs improvement yellow etc.

       

      Thank you in advance. 

      If there is no way of doing that I will accept your previous answer as solution and close the topic.

       

      Thanks

      Kostas

      • Anonymous's avatar
        Anonymous
        Not applicable

        Hi Kostas ,

         

        I do not think you can havecolous of of Bar changed based on Axis Values.

         

        Regards,

        Harsh Nathani