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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
BI_USER6
Frequent Visitor

How to visualize time series charts (line chart ) across different hierarchical levels (Dimensions)

Hi @all

I got a requirement from my client that to create a hierarchical time series chart  and visualize time-based data across different levels of granularity. 

Below is the sample data

| Date | Region | Country | City | Sales Amount |
|------------|---------|----------|---------|--------------|
| 2024-01-01 | North | USA | New York| 1000 |
| 2024-01-01 | South | USA | Miami | 1500 |
| 2024-02-01 | North | USA | New York| 1100 |
| 2024-02-01 | South | USA | Miami | 1600 |


The requirement is a line chart with Date in the x-axis and sales amount in Y-axis, and there will be another column called "agg_hierarchy", if the user selects agg_hierarchy =1, then the line chart should have 2 lines North and south for region within Country "USA", in the same way if the user selects agg_hierarchy =2, then the line chart should have 2 lines for city within country "USA" So on..

As per my knowledge, In Power BI, hierarchical dimensions cannot be directly added to the "Legend" field well in the time series charts.
so reaching to you all, if anyone have any alternatives to implement the same. Kindly suggest.

Thanks in advance.

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Thanks for the reply from lbendlin , please allow me to provide another insight:

Hi, @BI_USER6 

Regarding the issue you raised, my solution is as follows:
 

1.First, create a new parameter value and add the required columns:

vlinyulumsft_0-1725428965173.png

vlinyulumsft_1-1725428965174.png
2.Next, modify the parameters as follows and use them as slicers

Parameter = {
    (" 1 ", NAMEOF('cc'[ Region ]), 0),
    (" 2 ", NAMEOF('cc'[ City ]), 1)
}

vlinyulumsft_2-1725429022458.png

3.Next, modify the visualization as follows:
 

vlinyulumsft_3-1725429039075.png

 

 

vlinyulumsft_4-1725429039076.png

4.Here's the end result that hopefully meets your needs:

 

 

vlinyulumsft_5-1725429056465.png

 

 

vlinyulumsft_6-1725429056466.png

 



Please find the attached pbix relevant to the case.

Best Regards,

Leroy Lu

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

6 REPLIES 6
lbendlin
Super User
Super User

One alternative is to use Field Parameters.

lbendlin_0-1724982482365.pnglbendlin_1-1724982495557.png

 

lbendlin_2-1724982512131.png

 

Hi @lbendlin 
Thanks for the solution.
Field parameters will works on  individual dimensions, I need to display timeseries for a country along with all the regions within the selected country.

Anonymous
Not applicable

Thanks for the reply from lbendlin  please allow me to provide another insight:

Hi, @BI_USER6 

Excuse me, whether his answer has solved your problem, and if so, please accept his reply as a solution.
If you find a workaround yourself,
share your solution and accept it as a solution that will help other community members who have the same problem as you.
 

Best Regards,

Leroy Lu

Hi @Anonymous ,

Thank you for your response. Unfortunately, the solution provided by Ibendlin has not fully resolved the issue I am experiencing.

Could you please offer further assistance or suggest an alternative approach? I appreciate your help in addressing this matter.

Anonymous
Not applicable

Thanks for the reply from lbendlin , please allow me to provide another insight:

Hi, @BI_USER6 

Regarding the issue you raised, my solution is as follows:
 

1.First, create a new parameter value and add the required columns:

vlinyulumsft_0-1725428965173.png

vlinyulumsft_1-1725428965174.png
2.Next, modify the parameters as follows and use them as slicers

Parameter = {
    (" 1 ", NAMEOF('cc'[ Region ]), 0),
    (" 2 ", NAMEOF('cc'[ City ]), 1)
}

vlinyulumsft_2-1725429022458.png

3.Next, modify the visualization as follows:
 

vlinyulumsft_3-1725429039075.png

 

 

vlinyulumsft_4-1725429039076.png

4.Here's the end result that hopefully meets your needs:

 

 

vlinyulumsft_5-1725429056465.png

 

 

vlinyulumsft_6-1725429056466.png

 



Please find the attached pbix relevant to the case.

Best Regards,

Leroy Lu

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

 

 

How would that graphically look like?  Showing the same data twice in the same visual is a design red flag.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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