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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
sanman
Helper I
Helper I

How to create Clustered Column chart with multiple year dimensions

 

I want to show the number of items created by year and number of items closed by year on the same clustered column chart. How can I do that?

 

Capture.JPG

1 ACCEPTED SOLUTION
v-jingzhang
Community Support
Community Support

Hi @sanman 

Both of the above solutions can successfully achieve what you want. I illustrate both in my understanding with images below in case you need it.

Solution 1:

1. In query editor, select CreateYear and ClosedYear columns and unpivot them.

v-jingzhang_0-1599817747435.jpeg

2. Create a clustered column chart like below.

v-jingzhang_1-1599817747443.jpeg

 

Solution 2:

1. Create a year table, then create an active relationship ‘Items (2)CreateYear(*) – ‘YearYear(1) and an inactive relationship Items (2)ClosedYear(*) – ‘YearYear(1).

091023.jpg

2. Create a measure using Userelationship function as below.

 

Count of Closed = CALCULATE(COUNTROWS('Items (2)'),USERELATIONSHIP('Items (2)'[ClosedYear],'Year'[Year]))

 

3. Create the clustered column chart.

091024.jpg

 

Best Regards,

Community Support Team _ Jing Zhang

View solution in original post

3 REPLIES 3
v-jingzhang
Community Support
Community Support

Hi @sanman 

Both of the above solutions can successfully achieve what you want. I illustrate both in my understanding with images below in case you need it.

Solution 1:

1. In query editor, select CreateYear and ClosedYear columns and unpivot them.

v-jingzhang_0-1599817747435.jpeg

2. Create a clustered column chart like below.

v-jingzhang_1-1599817747443.jpeg

 

Solution 2:

1. Create a year table, then create an active relationship ‘Items (2)CreateYear(*) – ‘YearYear(1) and an inactive relationship Items (2)ClosedYear(*) – ‘YearYear(1).

091023.jpg

2. Create a measure using Userelationship function as below.

 

Count of Closed = CALCULATE(COUNTROWS('Items (2)'),USERELATIONSHIP('Items (2)'[ClosedYear],'Year'[Year]))

 

3. Create the clustered column chart.

091024.jpg

 

Best Regards,

Community Support Team _ Jing Zhang

amitchandak
Super User
Super User

@sanman , Create a year table join it with both Create year and close year. One will active another one will be inactive. Use userelation to in the measure to change date

 

This video has an HR example - but applies here too -

https://youtu.be/e6Y-l_JtCq4

Refer

https://radacad.com/userelationship-or-role-playing-dimension-dealing-with-inactive-relationships-in...

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Greg_Deckler
Community Champion
Community Champion

@sanman - I *think* you need to unpivot your year columns. Use Attribute as the legend, Value as the axis. Count of itemname for value



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.