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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
PBI_User_2023
Helper I
Helper I

Transpose a visual

I have a visual in Power BI Desktop that looks like this: 

 

Visual 1: 

ClientNamePlanIDAddressPhone
ABC123123 Broad St123456789
DEF456456 Main St287565462
XYZ781100 Link Road865476524

 

I want the visual to look like this: 

 

Visual 2: 

ClientNameABC
PlanID123
Address123 Broad St
Phone123456789

 

The underlying data comes from a table in Snowflake which is structured like Visual 1 shown above. When the user clicks on the Client Name, the Visual 2 shown above should get displayed (like a drill down feature). 

 

I dont know how to transpose to show that Visual 2 above. 

 

Please help! 

 

I am using Power BI Desktop 2.108.997.0 64-bit (August 2022)

 

Thank you!

 

1 ACCEPTED SOLUTION
v-cgao-msft
Community Support
Community Support

Hi @PBI_User_2023 ,

 

vcgaomsft_0-1690440632362.png

1. The first method puts these fields into the Value Stored Value bucket of the matrix and turns switch values to rows option on in the Format pane.

vcgaomsft_1-1690440759633.png

 

2. The second way is to build this table in the PowerQuery Editor. (Manual input is fine)

vcgaomsft_2-1690440902437.png

then ceate a new measure:

Measure = 
IF( 
    ISFILTERED('Table'[ClientName]),
    SWITCH(
        MAX('Table (2)'[ColumnName]),
        "ClientName",
        CALCULATE(MAX('Table'[ClientName]),'Table'[ClientName] = MAX('Table'[ClientName])),
        "PlanID",
        CALCULATE(MAX('Table'[PlanID]),'Table'[ClientName] = MAX('Table'[ClientName])),
        "Address",
        CALCULATE(MAX('Table'[Address]),'Table'[ClientName] = MAX('Table'[ClientName])),
        "Phone",
        CALCULATE(MAX('Table'[Phone]),'Table'[ClientName] = MAX('Table'[ClientName]))
    ),
    "Please select a client"
)

 

Please refer to the pbix file.

 

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly --  How to provide sample data in the Power BI Forum

View solution in original post

2 REPLIES 2
PBI_User_2023
Helper I
Helper I

Thank you, Gao! I tried method 1 and it works great! 

v-cgao-msft
Community Support
Community Support

Hi @PBI_User_2023 ,

 

vcgaomsft_0-1690440632362.png

1. The first method puts these fields into the Value Stored Value bucket of the matrix and turns switch values to rows option on in the Format pane.

vcgaomsft_1-1690440759633.png

 

2. The second way is to build this table in the PowerQuery Editor. (Manual input is fine)

vcgaomsft_2-1690440902437.png

then ceate a new measure:

Measure = 
IF( 
    ISFILTERED('Table'[ClientName]),
    SWITCH(
        MAX('Table (2)'[ColumnName]),
        "ClientName",
        CALCULATE(MAX('Table'[ClientName]),'Table'[ClientName] = MAX('Table'[ClientName])),
        "PlanID",
        CALCULATE(MAX('Table'[PlanID]),'Table'[ClientName] = MAX('Table'[ClientName])),
        "Address",
        CALCULATE(MAX('Table'[Address]),'Table'[ClientName] = MAX('Table'[ClientName])),
        "Phone",
        CALCULATE(MAX('Table'[Phone]),'Table'[ClientName] = MAX('Table'[ClientName]))
    ),
    "Please select a client"
)

 

Please refer to the pbix file.

 

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly --  How to provide sample data in the Power BI Forum

Helpful resources

Announcements
Fabcon_Europe_Social_Bogo

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

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

PBI_Carousel_NL_June

Fabric Community Update - June 2024

Get the latest Fabric updates from Build 2024, key Skills Challenge voucher deadlines, top blogs, forum posts, and product ideas.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.