Search code examples
powerbi

Create a visual in power BI with column name and values in 2 different columns as shown in the screenshot


I want to create a visual in Power BI with column names in one column and corresponding values in the other column. I have attached as screenshot below for clarity.

table like visual

I tried to use multi-row card but does not do the job. any idea?


Solution

  • You can try using the Matrix visual.

    • Add your columns to the Values well
    • Then under Format visual properties Values section > Options - Turn on Switch values to row groups rather than columns

    You will something similar to:
    enter image description here
    Then you can rename the Values, do a little formatting on the Row Headers etc...


    An alternative is to use the "HTML Content (lite)" custom visual available in the AppSource. With it you can create a measure of the HTML you want to present. Example measure to be used with the visual:

    HtmlTable = "
    <table>
      <tr><td>School ID</td><td>"& FIRSTNONBLANK('School'[School ID], 1) &"</td></tr>
      <tr><td>School Name</td><td>"& FIRSTNONBLANK('School'[School Name], 1) &"</td></tr>
    </table>
    "