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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
Fragan
Helper III
Helper III

Make rows <<NAME %>>a sub row of <<NAME>>

Hey,

 

I have this table 

 

LdjDX

 

I made a mesure to calculate "Attribute1 %" wich is Attribute1/Attribute2*100, and to do this i created :

 

  • A table : 
    Table3 = UNION(DISTINCT('Table'[Attributes]);{{"1and2 %"}})
  • Mesure : 
    Measure = 
    SUMX (
        DISTINCT ( 'Table3'[Attributes] );
        SWITCH (
            'Table3'[Attributes];
            "1and2 %"; IFERROR((CALCULATE ( SUM ( 'Table'[Value] ); 'Table'[Attributes] = "Attribute1" )
                / CALCULATE ( SUM ( 'Table'[Value] ); 'Table'[Attributes] = "Attribute2" ))*100;0);
                var a = 'Table3'[Attributes] return
            CALCULATE ( SUM ( 'Table'[Value] );'Table'[Attributes]=a)
        )
    )
    I also have a second mesure to exclude % from Subtotals and grand totals :
    Measure 2 =
    VAR __Table =
      ADDCOLUMNS(
        SUMMARIZE(
          'Table 3',
          [Group],
          [Attribute],
          "__Measure",[Measure]
        ),
        "__IncludeInTotals",SEARCH("%",[Attribute],,-1)
      )
    RETURN
      IF(
        HASONEVALUE('Table 3'[Attribute]),
        [Measure],
        SUMX(FILTER(__Table,[__IncludeInTotals] = -1),[__Measure])
      )​

So now my Table looks like this :

image.png

 

Now what i want to do is to make "Attribute1 %" a sub row of "Attribute1" (Like Attribute1, Attribute2 are sub rows of C1). And i want to do this for each Attribute. For example in the future i'll have "Attribute2 %", "Attribute3 %", etc and i want "AttributeX %" to be a sub row of "AttributeX".

 

Im really new to PowerBI so i'd really appreciate it if anyone can help me out with that.

 

Regards

1 ACCEPTED SOLUTION

You sure that this can do the job ? I mean i think if i do that i wont be able to show Attribute1 value.

 

Given your suggestion i think this may work :

Group Attribute Attribute%
C1 Attribute1 Attribute1 %
C1 Attribute1 

C1 Attribute2
C1 Attribute3

 

What do u think ?

 

 

View solution in original post

2 REPLIES 2
Greg_Deckler
Community Champion
Community Champion

You would need a setup like this:

Group Attribute Attribute%
C1 Attribute1 Attribute1 %
C1 Attribute2
C1 Attribute3
...

That would enable you to build the proper hierarchy.


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

You sure that this can do the job ? I mean i think if i do that i wont be able to show Attribute1 value.

 

Given your suggestion i think this may work :

Group Attribute Attribute%
C1 Attribute1 Attribute1 %
C1 Attribute1 

C1 Attribute2
C1 Attribute3

 

What do u think ?

 

 

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.