Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago

Dynamic X-Axis With Geography Hierarchy

Hi all,

 

Looking to get some assistance with an issue I've been having. I've set up a dynamic x-axis using the following technique:

 

https://www.youtube.com/watch?v=lFd2hjkKz_Q

 

TL;DW - Creating an index column, duplicating a table, unpivoting fields, creating a relationship between the working table and the new table, and having a slicer selection to be able to select which columns you want to be the x-axis in a Bar Chart. 

 

My issue is, I have 3 fields I'm looking to make part of a dynamic x-axis. Column A and Column B are fine, but there is a set of 3 columns representing different levels of geography (Country, Region, City for example). I'd like to include this in the dynamic x-axis so when I select the geography filter, I can also drill down in my data. 

 

My data looks like this: 

 

|Column A||Column B||Country||Region||City|

|Geo Code

 

(either 1, 2, or 3 based on the highest level of granularity - country-wide data would be 3, where city level data would be 1)| 

|Numerical data|

 

------------------------------------------

 

My ask is if anyone has any tricks to make something like this work. I want to be able to visualize a bar chart containing my data, with the x-axis being either Column A, Column B, and a Geography Hierarchy, in order to drill down by region and city - all dynamically chosen using a slicer. 

 

Please comment if you have any insight. Thank you PBI community!