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
Anonymous
Not applicable

Is it possible to have Pivot Table with nested with multiple facts for the row?

Hi there,

 

Hope everyone enjoyed there weekend.  Quick question for you all.  Perhaps I missing the visualization and/or flag, but is it possible to have a pivot table where key data facts are nested on the initial column with additional columns listed for other data facts?  

 

I know there a flag called Stepped Layout that lets you make the rows "nested" where they all show under one column.  You can also turn this off and as you drill deeper in rows additional columns appear.  However, I want the nested to be there for certain key values, but would just like the rest of the table to show up as seperate columns.  To better explain this I drew a picture...  In the example below, I'd like to know how to make Email / Phone appear while Employee is under Department in the same column...

 

As always, any help is much appreciated!  Thank you all!  sample-delete.png

 

1 ACCEPTED SOLUTION
MFelix
Super User
Super User

Hi @Anonymous ,

 

This option of having some columns in the step layout and other not is not possible. Believe that this is a look and feel problem correct?

One option can be to add the E-mail and Phone to the values part of the table, however you would need to do the following:

 

Create a table with the names of the values you need adding the E-mail and phone something similar to:

MeasureSelection =
SWITCH (
    TRUE ();
    SELECTEDVALUE ( 'Table'[Measure] ) = "Email"; IF ( HASONEVALUE ( Table[Name] ); MAX ( Table[Email] ); BLANK () );
    SELECTEDVALUE ( 'Table'[Measure] ) = "Phone"; IF ( HASONEVALUE ( Table[Name] ); MAX ( Table[Phone] ); BLANK () );
    SELECTEDVALUE ( 'Table'[Measure] ) = "ValueA"; SUM ( Table[ValueA] );
    SELECTEDVALUE ( 'Table'[Measure] ) = "ValueB"; SUM ( Table[ValueB] )
)

Now just use the measure column on the column headers and the measureselection on values.


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



View solution in original post

3 REPLIES 3
MFelix
Super User
Super User

Hi @Anonymous ,

 

This option of having some columns in the step layout and other not is not possible. Believe that this is a look and feel problem correct?

One option can be to add the E-mail and Phone to the values part of the table, however you would need to do the following:

 

Create a table with the names of the values you need adding the E-mail and phone something similar to:

MeasureSelection =
SWITCH (
    TRUE ();
    SELECTEDVALUE ( 'Table'[Measure] ) = "Email"; IF ( HASONEVALUE ( Table[Name] ); MAX ( Table[Email] ); BLANK () );
    SELECTEDVALUE ( 'Table'[Measure] ) = "Phone"; IF ( HASONEVALUE ( Table[Name] ); MAX ( Table[Phone] ); BLANK () );
    SELECTEDVALUE ( 'Table'[Measure] ) = "ValueA"; SUM ( Table[ValueA] );
    SELECTEDVALUE ( 'Table'[Measure] ) = "ValueB"; SUM ( Table[ValueB] )
)

Now just use the measure column on the column headers and the measureselection on values.


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



Anonymous
Not applicable

@MFelix Thanks Miguel!  I actually just came on hear to let others know of a way I had figured out earlier today (honestly by mistake).  It was similar to your approach of using it as a value (although I just used the max without the if statement).  However, it wasn't perfect because it repeated with each column total.  Nevertheless, I'll give your version a try tomorrow to see if that makes it a bit cleaner.

 

@amitchandak, definitely just voted.  Really shocked this isn't a basic feature of the product.

 

-Brett

amitchandak
Super User
Super User

@Anonymous , if you looking for a hybrid table like this. Vote for idea : https://ideas.powerbi.com/forums/265200-power-bi-ideas/suggestions/39773011-hybrid-table

Hybrid.png

 

You have check for custom visual or manager with measures, which is less dynamic option

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.