Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
Shifty1993
Regular Visitor

Fixing the width of a column bar chart with several measures in the Y-axis

Dear community,

 

I created several measures (called [0], ..., [20]) which calculates a y value for the x values 0, ..., 20.

 

Afterwards i visualised this with a bar chart. I put all measures in the y-Axis. 

 

The problem is to make the bars wider. How I already read in other common topics is that I need a x-Axis to do so.

 

So what I tried is to make a new table which is not working, because it won't accept the measure as a cell value.

 

Table = {
    (0, measure[0]),
    (1, measure[1]),
    ...
}
 
Somehow I have to find a way to make a relationship between the measure results and the values 0, ...,20.
x  -> y
0 - > measure[0]
1 - > measure[1]
...
 
I don't see any way to do this at the moment. Is there any trick here?
 
Best regards,
Phil
 
1 ACCEPTED SOLUTION

Hi Eason,

 

I could already solve it.

 

I used a Switch True Condition to connect x-Values and y-Value. 

Switch(

    TRUE(),

    x-Value, CALCULATE(...),

    x-Value, CALCULATE(...),

    ...

)

This worked. We can close this topic

View solution in original post

5 REPLIES 5
Anonymous
Not applicable

Hi @Shifty1993 ,
Have you tried 
measure2[0] = Calculate(measure[0],x=0)
measure2[1] = Calculate(measure[1],x=1)
measure2[2] = Calculate(measure[2],x=2)
.
.
.
and so on ...
And put the X values column in the X Axis.

It is not working. I cannot pull the measure to the X-Axis.

 

I created the following measure:

x0 = CALCULATE([0], Punktzahl[Punktzahl] = 0)
 
Afterwards I tried to pull this x-Value for x=0 into X-Axis. But it is not being accepted.

Hi, @Shifty1993 

Can you share a sample file?

It's easier to take a look at the problem.

Best Regards,
Community Support Team _ Eason

Hi Eason,

 

I could already solve it.

 

I used a Switch True Condition to connect x-Values and y-Value. 

Switch(

    TRUE(),

    x-Value, CALCULATE(...),

    x-Value, CALCULATE(...),

    ...

)

This worked. We can close this topic

Shifty1993
Regular Visitor

Additional information: the function in the measures have several variable x  values. I just need the relationship between 0, ... , 20 and the result out of the measures.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors