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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
marcelammelo
Helper I
Helper I

How to freeze a column on a bar chart

Hello, everybody!

 

I'd like to know if is possible to do a bar chart in Power BI like the image below.

 

Capturar.PNG

 

I have a bar whose data is the cumulative of the year 2016 and then I have others bars whose data are the sum of each month of 2017.  Is there anyway to freeze the first bar (2016) on the bar chart?

 

Best regards,

Marcela. 

 

 

1 ACCEPTED SOLUTION
v-qiuyu-msft
Community Support
Community Support

Hi @marcelammelo,

 

We need to create a summarized for year 2016 to return total value for all months in year 2016, then union this table with the table which has month values.

 

Assume the fact data likes below:

 

q3.PNG

 

You can create another table with DAX:

 

Table = UNION(SUMMARIZE('Table1','Table1'[Year],"Amount",SUM('Table1'[Amount])),SUMMARIZE('Table1','Table1'[MonthName],"Amount",SUM('Table1'[Amount])))

 

q4.PNG

 

Then create a column chart, drag Year column to Axis, Amount to Values. For details, you can download the attached pbix file to have a look.

 

q5.PNG

 

Best Regards,
QiuyunYu

Community Support Team _ Qiuyun Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-qiuyu-msft
Community Support
Community Support

Hi @marcelammelo,

 

We need to create a summarized for year 2016 to return total value for all months in year 2016, then union this table with the table which has month values.

 

Assume the fact data likes below:

 

q3.PNG

 

You can create another table with DAX:

 

Table = UNION(SUMMARIZE('Table1','Table1'[Year],"Amount",SUM('Table1'[Amount])),SUMMARIZE('Table1','Table1'[MonthName],"Amount",SUM('Table1'[Amount])))

 

q4.PNG

 

Then create a column chart, drag Year column to Axis, Amount to Values. For details, you can download the attached pbix file to have a look.

 

q5.PNG

 

Best Regards,
QiuyunYu

Community Support Team _ Qiuyun Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hello, @v-qiuyu-msft!

 

That's amazing! You're awesome!

Thanks a lot for the solution and example. You made it easier than I could imagine.

 

You really helped me.

 

Regards,

Marcela.

Helpful resources

Announcements
July 2024 Power BI Update

Power BI Monthly Update - July 2024

Check out the July 2024 Power BI update to learn about new features.

PBI_Carousel_NL_June

Fabric Community Update - June 2024

Get the latest Fabric updates from Build 2024, key Skills Challenge voucher deadlines, top blogs, forum posts, and product ideas.

Top Solution Authors