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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
Gazi
Frequent Visitor

Calculate AVG count of children elements in 9 levels of hierarchy

Hi everyone,

 

I have 2 tables:

 

First: StructureGroupHierarchy:

 

StructureGroupIDStructureGroupNameStructureGroupNamepathLevel 1Level 2Level 3Level 4Level 5Level 6Level 7Level 8Level 9StructureGroupRevisionID
53873StarStar15|53891|53873MarkenMandantStar      53873
53874AlessiAlessi15|53891|53874MarkenMandantAlessi      53874
53875MayserMayser15|53891|53875MarkenMandantMayser      53876
53876MonariMonari15|53891|53876MarkenMandantMonari      53875
53877Faller KonfitüreFaller Konfitüre15|53891|53877MarkenMandantFaller Konfitüre      53877
53878Churchill´sChurchill´s15|53891|53878MarkenMandantChurchill´s      53878
53879Margot SchmittMargot Schmitt15|53891|53879MarkenMandantMargot Schmitt      53881
53880BlendBlend15|53891|53880MarkenMandantBlend      53879
53881e+m Holzproduktee+m Holzprodukte15|53891|53881MarkenMandante+m Holzprodukte      53880
53882ManasManas15|53891|53882MarkenMandantManas      53882
53883BenningerBenninger15|53891|53883MarkenMandantBenninger      53883
53884La BallerinaLa Ballerina15|53891|53884MarkenMandantLa Ballerina      53884
53885BrandiniBrandini15|53891|53885MarkenMandantBrandini      53885
53886SochaSocha15|53891|53886MarkenMandantSocha      53886
53887BEEMBEEM15|53891|53887MarkenMandantBEEM      53887
53888DiemerDiemer15|53891|53888MarkenMandantDiemer      53888
53889Natura VitalisNatura Vitalis15|53891|53889MarkenMandantNatura Vitalis      53889
53890SorgerSorger15|53891|53890MarkenMandantSorger      53890
53893cpm DUEcpm DUE15|53891|53893MarkenMandantcpm DUE      53893
53894onlydesignonlydesign15|53891|53894MarkenMandantonlydesign      53894
53895GD ImportGD Import15|53891|53895MarkenMandantGD Import      53895
53896Fuchs und SchmittFuchs und Schmitt15|53891|53896MarkenMandantFuchs und Schmitt      53896
53897CoveredCovered15|53891|53897MarkenMandantCovered      53897
53898La SiestaLa Siesta15|53891|53898MarkenMandantLa Siesta      53898

 

Second table: StructureGroupAttribute:

StructureGroupAttributeIDStructureAttributeIDDataTypeIDStructureGroupRevisionIDIsMandatoryColumn
5266156964FALSE1
30266156810FALSE1
75266156737FALSE1
88266157078FALSE1
111266156675FALSE1
112266157095FALSE1
129266156980FALSE1
161266157229FALSE1
242266156688FALSE1
246266157008FALSE1
278266156975FALSE1
322266156814FALSE1
330266157101FALSE1
375266156790FALSE1
377266156880FALSE1
432266156815FALSE1
452266156895FALSE1
456266157021FALSE1
457266157077FALSE1
466266157267FALSE1
502266156788FALSE1
602266157013FALSE1
644266157020FALSE1
663266157076FALSE1

 

 

Relationship column: StructureGroupRevisionID 

Capture3.JPG

 

 

 

My expected result:

 

One visual which shows the StructureGroupHierarchy levels with the AVERAGE count of assigned StructureGroupAttributeIDs for it's children. For example now I have 24.6K Attributes assigned to level_1 in total, but their average would be 3.5K: 

 

Capture.JPGCapture2.JPG

 

 

2 REPLIES 2
v-yuta-msft
Community Support
Community Support

Hi Gazi,

 

Have you build a relationship between the two tables based on some columns? I recommend you build a slicer based on column in table StructureGroupHierarchy, then you can filter the column chart of  table StructureGroupAttribute.

 

Regards,

Jimmy Tao

Hi Jimmy!

 

Oh sorry I forgot to mention the relationship, I just added it. Which column in StructureGroupHierarchy table you mean for slicer?

 

 

Many thanks!

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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