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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Input multiple hierarchy data in identical line chart in Power bi

Hi All,

 

I have a dimension table (building list) and a fact table (Rent history per building) in data model (below):

TWMY1014_0-1642872673814.png

i can show per building rent history in line chart (x-axis is Year-month, like below) with filter by different hierarchy range from District (highest level), Sub-district to building (lowest level). 

TWMY1014_1-1642872890019.png

Question: I want to add district level rent average into identical graph so when building(s) was / were selected in slicer, corresponding district rent average history will be shown as well. I can perform in seperate graph like below but is more appropriate to shown in identical graph for easy comparison:

TWMY1014_4-1642873724236.png

 

TWMY1014_5-1642873764116.png

I have try below:

1. Add district average per Year-month to Rent fact table and try show both building rent and distract rent in line chart, but cannot figure out dax (averageifs in excel) and line chart value field can only show >1 value when legend field is empty, which might not be appropriate for me as there're several hundred buildings so it's easier for user to easier notice.

 

2. Create 2 sepeate query (avg rent per building & per distract) and union them in seperate table as data source. But I still fail to locate a key to filter buildings with corresponding district average when lowest level (building) was selected, i.e. if I choose building A / A & B (same district), no district average was shown.

 

Appreciate for yours help on this and I can clarify anything if I didn't express clearly in above. Thanks.

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @parry2k ,

 

Thanks for the reply.

I finallly fix it by create a snapshot of all required data at seperate table by DAX and twick on backend data model.

But thanks a lot for your help and comments on above. ^^

 

Regards,

TWMY1014

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi @Anonymous 

Has your problem been solved ? If it has been solved, then please consider Accept it as the solution to help the other members find it more quickly.

 

Best Regard

Community Support Team _ Ailsa Tao

Anonymous
Not applicable

Hi @parry2k ,

 

Thanks for the reply.

I finallly fix it by create a snapshot of all required data at seperate table by DAX and twick on backend data model.

But thanks a lot for your help and comments on above. ^^

 

Regards,

TWMY1014

parry2k
Super User
Super User

@Anonymous check this post, a similar question was answered in this post.Solved: Re: Line chart with Legend and additional measure - Page 2 - Microsoft Power BI Community as matter of fact, in the next few days I'm about to do a video on it, if interested, do subscribe to my YouTube channel (link below) 

 

 

Follow us on LinkedIn and YouTube.gif to our YouTube channel

 

Learn about conditional formatting at Microsoft Reactor

My latest blog post The Power of Using Calculation Groups with Inactive Relationships (Part 1) (perytus.com) I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!

 

Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Kudoed Authors