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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Jiri_Kominek_3
New Member

How to get hierarchy in Line and stacked column chart with table

Hello all,

I am using Line and stacked column chart with table.

Right now I have split between two years 2023 and 2024 and chart is not able to use hierarchy of dates by Year and month for example. Only one the type of data. I would like to have complete chart where I see 2023 per month and continue with 2024 per month.

Jiri_Kominek_3_0-1705485038153.png

 

Jiri_Kominek_3_2-1705485196204.png

 

 

Jiri_Kominek_3_1-1705485185692.png

 

I can use classic column chart which works but I need to have data table below chart.

Could you please help me how to solve it?

 

https://drive.google.com/file/d/1lSFhjkUu81vjssWAN1EwLkpmHl8pe1nc/view?usp=drive_link

 

Thank you

 

Jiri

 

 

 

2 REPLIES 2
v-nuoc-msft
Community Support
Community Support

Hi @Jiri_Kominek_3 

 

For your question. To display data hierarchically by year and month, please try the following:

 

Make sure your date data is in a format that Power BI recognizes as a date. If you have separate fields for Year and Month, consider creating a date field that combines them.

 

If using a single date field, Power BI will automatically create a date hierarchy when you drag the field onto the Axis area.

 

If you have separate Year and Month fields, create a custom hierarchy by dragging the Year field to the Axis box, then dragging the Month field and dropping it directly onto the Year field in the Axis box.

 

Drag your date hierarchy to the Axis area of the Line and Stacked Column chart visual.

 

Add the measures for the stacked columns into the Value area.

 

Add the measure for the line into the Line values area.

 

Click on the arrow next to the date field in the Axis area and ensure that only the Year and Month levels are selected for display.

 

By following these steps, your chart should now display data for 2023 and 2024, broken down by month in a hierarchical manner.

 

To include a data table below the chart:

 

In the same report, add a new table visual.

 

Drag the same fields you used in the Line and Stacked Column chart into the Values area of the table visual.

 

Resize and position the table visual below your Line and Stacked Column chart on the report canvas.

 

Regards,

Nono Chen

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

 

 

Hi Nono Chen,

sorry perhaps I explained myself wrong way. I know how this works. And hierarchy works perfectly in classic column chart but not in Line stacked column chat with table.

Jiri_Kominek_3_1-1705578702344.png

 

I cannot add additional time format (quarter, month). I can have only one there.

 

 

Jiri_Kominek_3_0-1705578482875.png

I suppose this chart is not able to do it. I see there is only option to create new data format but I don´t right way.

If I try 2023/1, 2023/2 .....2023/11, 2023/12...then it is sorted 2023/1, 2023/11, 2023/12, 2023/2.....2024/1.

 

Kind regards

 

Jiri

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.