Search code examples
excelpowerbidaxpowerquerym

Multiple rows in a single row in power bi


Could some one help me how to achieve the below scenario in power bi for table visual.

User Report 1 Report 2 Report 3
David x
David y
David Z

Note: report 1, report 2, report 3 are calculated columns in power bi

I want the Output like below.

User Report 1 Report 2 Report 3
David x y z

Solution

  • If your data always contains values in one column/row per user, you can select User column in the table visual and select first value from your calculated columns.

    Here is my sample table with 3 calculated columns for David-

    enter image description here

    And, here is the output (you can rename the column name)-

    enter image description here


    Behavior when a report name selected in the slicer

    enter image description here


    Calculated columns-

    report 1 = if(your_table[report] = "report 1", "report 1")
    report 2 = if(your_table[report] = "report 2", "report 2")
    report 3 = if(your_table[report] = "report 3", "report 3")