Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Pivot Formatting

Hello

 

I have this table:

ProductPropertyMinMax
ID1A13
ID1B24
ID1C36
ID2A45
ID2B12
ID2C24

 

And I need to create this pivot:

PropertyMinMaxDistinct Count of Product
A131
A451
B121
B241
C241
C361

 

Any idea how to format the above?

 

Thanks!

  • Anonymous's avatar
    Anonymous
    4 years ago

    Hi Anonymous ,

     

    In Power BI matrix visual, you will need to put both [Product] and [Property] in Rows field.

    And the result would be like below. Otherwise the values will be aggregated.

     

7 Replies

  • Hi,

    Property A has 2 distinctcount products - ID1 and ID2.  So the answer should be 2.  This is same for the other properties as well.  How do you get the answer as 1 in each row?

  • Anonymous's avatar
    Anonymous
    Not applicable

    Ashish_Mathur thanks, this comes directly from Excel, hope the below helps?

    Source:

     

    Pivot:

     

    Result:

     

    • Ashish_Mathur's avatar
      Ashish_Mathur
      Super User

      Hi,

      Drag Property, Min and Max to a Table visual and write this measure

      Measure = distinctcount(Data[Property])

      Hope this helps.

       

      • Anonymous's avatar
        Anonymous
        Not applicable

        Ashish_Mathur  thanks but I need this in a matrix/pivot visual, sorry if it wasn't clear

  • Anonymous's avatar
    Anonymous
    Not applicable

    Changing the layout form of a PivotTable


    To make substantial layout changes to a PivotTable or its various fields, you can use one of three forms:

    Compact form displays items from different row area fields in one column and uses indentation to distinguish between the items from different fields. Row labels take up less space in compact form, which leaves more room for numeric data. Expand and Collapse buttons are displayed so that you can display or hide details in compact form. Compact form is saves space and makes the PivotTable more readable and is therefore specified as the default layout form for PivotTables.

    PivotTable in compact form

    Tabular form displays one column per field and provides space for field headers.

    PivotTable in tabular form

    Outline form is similar to tabular form but it can display subtotals at the top of every group because items in the next column are displayed one row below the current item.

     

    Regards,

    Rachel Gomez

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Anonymous ,

     

    In Power BI matrix visual, you will need to put both [Product] and [Property] in Rows field.

    And the result would be like below. Otherwise the values will be aggregated.