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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Joe_0365
Frequent Visitor

question about decomp hierarchy

I love decomp tree in power bi, and wondering is possible to have multi-dimensions in hierarchy? 

 

I often use it like in picture 1, but in some cases, I need it to work like in picture 2. 

Picture 1Picture 1Picture 2Picture 2

I'm not sure if there is a custom visual that can do that for free if the decomp tree can not support my requirement. Thank you. 

 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi  @Joe_0365 ,

I created some data:

vyangliumsft_0-1676277271710.png

 

Here are the steps you can follow:

1. Create measure.

Measure =
SWITCH(
    TRUE(),
ISINSCOPE('Table'[Group3])&& MAX('Table'[Group3])="Transactions",SUMX(FILTER(ALL('Table'),'Table'[Group3]="Transactions"),[Value]),
ISINSCOPE('Table'[Group3])&& MAX('Table'[Group3])="avg$per transaction",AVERAGEX(FILTER(ALL('Table'),'Table'[Group3]="avg$per transaction"),[Value]),
ISINSCOPE('Table'[Group3])&& MAX('Table'[Group3])="avg item count per transaction",COUNTX(FILTER(ALL('Table'),'Table'[Group3]="avg item count per transaction"),[Value]),
ISINSCOPE('Table'[Group2]),SUMX(FILTER(ALL('Table'),'Table'[Group2]=MAX('Table'[Group2])),[Value]),
ISINSCOPE('Table'[Group1]),SUMX(ALL('Table'),[Value]))

2. Result:

 

vyangliumsft_1-1676277271714.png

Whether it meets your expected results, if not, Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data. We can better understand the problem and help you.

 

Best Regards,

Liu Yang

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

1 REPLY 1
Anonymous
Not applicable

Hi  @Joe_0365 ,

I created some data:

vyangliumsft_0-1676277271710.png

 

Here are the steps you can follow:

1. Create measure.

Measure =
SWITCH(
    TRUE(),
ISINSCOPE('Table'[Group3])&& MAX('Table'[Group3])="Transactions",SUMX(FILTER(ALL('Table'),'Table'[Group3]="Transactions"),[Value]),
ISINSCOPE('Table'[Group3])&& MAX('Table'[Group3])="avg$per transaction",AVERAGEX(FILTER(ALL('Table'),'Table'[Group3]="avg$per transaction"),[Value]),
ISINSCOPE('Table'[Group3])&& MAX('Table'[Group3])="avg item count per transaction",COUNTX(FILTER(ALL('Table'),'Table'[Group3]="avg item count per transaction"),[Value]),
ISINSCOPE('Table'[Group2]),SUMX(FILTER(ALL('Table'),'Table'[Group2]=MAX('Table'[Group2])),[Value]),
ISINSCOPE('Table'[Group1]),SUMX(ALL('Table'),[Value]))

2. Result:

 

vyangliumsft_1-1676277271714.png

Whether it meets your expected results, if not, Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data. We can better understand the problem and help you.

 

Best Regards,

Liu Yang

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

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

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 Solution Authors
Top Kudoed Authors