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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
ReneeKoelewyn
Frequent Visitor

Structuring dataset for better visualization

Good day,

 

I am struggling to structure my dataset so that the x-axis represents the campuses and the qualifications are grouped per year per campus. I have included an example of what the clustered column chart looks like and an example of the dataset. So basically, I want to swap them, but when I do that, it does not group the campus together for both years. I tried transposing the data and adding a column for the year and campus, but I got an error that items are duplicated. 

 

On the right-hand side, it lists the four campuses' information for 2023 and 2024, but I would like the chart to show the bars for each year for each program for each campus. 

 

I hope my question makes sense 🙂

 

ReneeKoelewyn_0-1729250065807.png

 

ReneeKoelewyn_1-1729250131824.png

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Thanks for the concern from Ritaf1983.

 

Hi @ReneeKoelewyn ,

 

Based on your description, I created simple data:

vlinhuizhmsft_0-1729675629738.png

 

I performed the following:

 

1.Select the first column and unpivot the other rows in Power Query Editor.

vlinhuizhmsft_1-1729675707513.png

 

2.Change data type:

vlinhuizhmsft_2-1729675860937.png

 

3.Create two new columns:

 

Year = 20&LEFT([Attribute],2)
Campus = RIGHT([Attribute], LEN([Attribute]) - 2)

 

vlinhuizhmsft_3-1729675977925.png

 

Result:

vlinhuizhmsft_4-1729676019967.png

 

If you still have any questions, can you provide a more detailed description or a .pbix file with the private data removed.

 

Best Regards,
Zhu

 

If there is any 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
Anonymous
Not applicable

Thanks for the concern from Ritaf1983.

 

Hi @ReneeKoelewyn ,

 

Based on your description, I created simple data:

vlinhuizhmsft_0-1729675629738.png

 

I performed the following:

 

1.Select the first column and unpivot the other rows in Power Query Editor.

vlinhuizhmsft_1-1729675707513.png

 

2.Change data type:

vlinhuizhmsft_2-1729675860937.png

 

3.Create two new columns:

 

Year = 20&LEFT([Attribute],2)
Campus = RIGHT([Attribute], LEN([Attribute]) - 2)

 

vlinhuizhmsft_3-1729675977925.png

 

Result:

vlinhuizhmsft_4-1729676019967.png

 

If you still have any questions, can you provide a more detailed description or a .pbix file with the private data removed.

 

Best Regards,
Zhu

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.

Ritaf1983
Super User
Super User

Hi @ReneeKoelewyn 

Can you please share a pbix or some dummy data that keep the raw data structure with expected results? It should help us clarify your scenario and test to coding formula.

How to Get Your Question Answered Quickly  

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.