Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago
Solved

Spacing between bars for clustered column chart that used measures only in y axis.

I have a clustered column chart visual that is showing to total awareness for each activity in the marketing channels, and some of the awarness activities measure calcauted based on more than one me...
  • Ritaf1983's avatar
    2 years ago

    Hi Anonymous 
    You can't modify the space between the bars, because the graph doesn't have X-axis. it is jest a set of measures that you put there.
    To resolve this issue you can create a measures table and use a dynamic measure to get a bar for every measure.
    For example, in my data, I want to create a graph like yours with Chinese sales and total sales.
    The first step is to create a table of wanted measures :

    Then you can create a dynamic measure using switch

    dynamic measure = SWITCH(SELECTEDVALUE('sales table'[sales type]), "chineese sales",[Chineese_sales],
                                            "total sales",[total_sales])

    After you have a table and a dynamic measure you can use a graph in its natural way :

    the pbix is attached

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