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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
HassanI
Frequent Visitor

Hierarchy with non aggregated values

Hello,

Is there a way to display a non-aggregated value for each bar in the following chart without using legend (we have 257 rows and a business requirement to transverse the graph following the hierarchy using drill down function).

graph.GIF

 

I have 257 business areas, all with 4 digit codes and a parent child relationship via these codes. I have taken these codes and implemented the following calculated table using PATH functions:hierarchy 1.GIF

hierarchy 2.GIF

I have created 2 measures:

Maxdepth = MAX(hierarchydepth)

Browsedepth = isfiltered(level2) + isfiltered(level3)+...isfiltered(level8)

I have created a hierarchy using the level 2 to level 8 columns

 

My sales table has the following columns and is related to the hierarchy table via cost centre column:

 

sales 1.GIFsales 2.GIF

 

For each of the 257 rows in the hierarchy table I want to fetch the YTD vs plan % column value. At the top of the hierarchy I have 1 cost centre which I need this value for without it aggregating the value due to the hierarchy and display this as a bar graph. I have the drill down working as required, I can click on this 1 cost centre at level 2 and then it opens all level 3 cost centres related to this one etc. However it is aggregating the YTD vs plan %. I need it to just display the value related to that cost centre and not the sum/avg of all the cost centres underneath it.

 

7 REPLIES 7
MungBurger
Helper I
Helper I

@HassanI  This was the solution that worked for me.

https://www.kasperonbi.com/use-isinscope-to-get-the-right-hierarchy-level-in-dax

 

The only limitations are that it can only be used in Azure AS or in the Power BI Service.

 

Regards

Pete 

v-shex-msft
Community Support
Community Support

HI @HassanI,

 

Can you please share a pbix file to test? I'm not so clear for your data.

 

In addition, I'm not so sure why you drill all parent level code to bottom level, it may conflict your 'parent-child' relationships.

 

BTW, parent-child hierarchy relationship not works with tables who link with normal relationships, if you want to auto summary child level data to parent level, you need to manually extract child items from marketer table.

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

What is the best method for me to share a PBIX file with you?

HI @HassanI,

 

After I remove non existent child code and rebuild hierarchy, your visual graph can be drilled again.

31.gif

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Hi as I mentioned, the drillthrough was already working fine, the issue was the values field "YTD vs plan %". If I'm looking at level 1 we have one code 4911, it's YTD vs Plan % in the data is -1.85% which is the value I want to display against 4911. Not the aggregated value of everything under it. When I click to drilldown on 4911 it opens level 2 cost centres related to 4911 such as 4216, 4428, 5691....and so on. For each of these i want to pull the specific ytd vs plan % not the aggregated value.

Hi @HassanI,

 

I don't think this issue simple to achieve, visuals will auto summary it's child values.

 

For your requirement, you need to add condition to check current hierarchy levels, then break current summary and manually coding formula to get specific value with filters to get data from particular level.

 

It should be complex and hard coding.

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

HI @HassanI,

 

I have some trouble to access the your file, please upload to onedrive or google drive and share link here.
Notice: do mask on sensitive data before sharing

 

Reagards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.