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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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