Forum Discussion

MaliniBaktha's avatar
MaliniBaktha
Helper II
3 years ago
Solved

three bar chart from same column

Hi, 

 

I have a column with numbers, I have to create three bar charts (minmum, average and median) from the values using that column. But when I try to do that the bars gets attached to each other.  The bars are attached to each other leaving big space in the left and right side, is there a way to give space between the bars . I did try creating (average, median and minimum as a separate measures as well but nothing is working. Any suggestions in this ?

 

  • Hi MaliniBaktha 

    This is happening because you don't have an X-axis.
    You just put 3 different measures.

    To get the graph you can generate a table of your measures, please follow these steps.

    1. Create blank table with a column with your measures :

    2. Regular measures of what you need

    average = AVERAGE('Table'[Value])
    median = MEDIAN('Table'[Value])
    average = AVERAGE('Table'[Value])

    3. Create dynamic measure in the new table

    bar measure = if (SELECTEDVALUE('measures table'[Measure])= "Minimum" ,[minimum],
    if (SELECTEDVALUE('measures table'[Measure])="Median",[median],[average]))

    4. Put column "measures column" from the new table on x axis and "bar measure" on Y:

     
     

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

     

  • You are cool this wroked fine. I did the same before but made it wrongly 

3 Replies

  • Hi MaliniBaktha 

    This is happening because you don't have an X-axis.
    You just put 3 different measures.

    To get the graph you can generate a table of your measures, please follow these steps.

    1. Create blank table with a column with your measures :

    2. Regular measures of what you need

    average = AVERAGE('Table'[Value])
    median = MEDIAN('Table'[Value])
    average = AVERAGE('Table'[Value])

    3. Create dynamic measure in the new table

    bar measure = if (SELECTEDVALUE('measures table'[Measure])= "Minimum" ,[minimum],
    if (SELECTEDVALUE('measures table'[Measure])="Median",[median],[average]))

    4. Put column "measures column" from the new table on x axis and "bar measure" on Y:

     
     

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

     

    • MaliniBaktha's avatar
      MaliniBaktha
      Helper II

      You are cool this wroked fine. I did the same before but made it wrongly