Forum Discussion

HanaOkugic's avatar
HanaOkugic
Regular Visitor
8 months ago
Solved

Showing the same parameter multiple times in a Table visual

Hi everyone,

I could really use some help. I don’t think this should be too complicated, but I’ve gotten completely tangled up.

Here’s the situation: I have a simple Excel table with my data (DATA), and I want to create a Table visual that looks like (TABLE VISUAL).

 

The main issue is that I need to display the same parameter multiple times in the Table visual. For example, Apple and Peach need to appear twice. I’m not sure how to set this up so the visual shows it correctly.

Any guidance or tips would be greatly appreciated!

  • Hi HanaOkugic 

    1️⃣ Add a “Helper Column” to make duplicates unique

    Power BI does not allow identical rows to appear twice if there’s no unique identifier.

    Solution: create a new column in your table (Power Query or DAX) to make each row unique.


    Power Query approach

    1. Go to Transform Data → Power Query.


    2. Add an Index Column:

    Home → Add Column → Index Column → From 1

     

    3. Add a Custom Column that combines your parameter with the index:

     

    UniqueParameter = [Parameter] & " - " & Number.ToText([Index])

    4. Load data back to Power BI.


    5. Use UniqueParameter in the Table visual — now duplicates will appear as separate rows.

     


    ---

    2️⃣ Use DAX to create a “duplicated table”

    If you want to repeat certain values programmatically:

    DuplicatedTable =
    UNION(
    SELECTCOLUMNS(DATA, "Parameter", DATA[Parameter], "Value", DATA[Value]),
    SELECTCOLUMNS(
    FILTER(DATA, DATA[Parameter] IN {"Apple","Peach"}),
    "Parameter", DATA[Parameter],
    "Value", DATA[Value]
    )
    )

    This creates a table with Apple and Peach repeated.

    Use DuplicatedTable in your Table visual.

    If this solution helped you, please mark it as the accepted answer so it can help others as well.

    Best regards 

     

6 Replies

  • HanaOkugic , Please share data in text format. One on the way I can think of having dimension with multiple value with a unique no for each row and having many to many join 

     

    The approach is very similar to

    Single Select with Select All : https://youtu.be/plGqCEZRfXU

  • This can be done with DAX.

    First create a calculated table called custom hierarchy. Do this through Table view -> New table

    Custom Hierarchy =
    DATATABLE(
        "DisplayOrder", INTEGER,
        "Fruits",       STRING,
        {
            { 1, "Apple"      },
            { 2, "Peach"      },
            { 3, "Pear"       },
            { 4, "Blueberry"  },
            { 5, "Apple"      },
            { 6, "Strawberry" },
            { 7, "Peach"      },
            { 8, "Raspberry"  }
        }
    )

    Then create a measure:

    Attribute Measure =
    VAR FruitName = SELECTEDVALUE ( 'Custom Hierarchy'[Fruits] )
    RETURN
    CALCULATE (
        MAX ( DATA[Attribute] ),
        DATA[Fruits] = FruitName
    )

    This wil give you the desired output. I tried it and got the following table:

    Make sure to add the display order to the table otherwise the output will be aggragated. Also make sure the outcome is not summed.

     

    Hope this is helpfull.



  • Hi HanaOkugic 

    1️⃣ Add a “Helper Column” to make duplicates unique

    Power BI does not allow identical rows to appear twice if there’s no unique identifier.

    Solution: create a new column in your table (Power Query or DAX) to make each row unique.


    Power Query approach

    1. Go to Transform Data → Power Query.


    2. Add an Index Column:

    Home → Add Column → Index Column → From 1

     

    3. Add a Custom Column that combines your parameter with the index:

     

    UniqueParameter = [Parameter] & " - " & Number.ToText([Index])

    4. Load data back to Power BI.


    5. Use UniqueParameter in the Table visual — now duplicates will appear as separate rows.

     


    ---

    2️⃣ Use DAX to create a “duplicated table”

    If you want to repeat certain values programmatically:

    DuplicatedTable =
    UNION(
    SELECTCOLUMNS(DATA, "Parameter", DATA[Parameter], "Value", DATA[Value]),
    SELECTCOLUMNS(
    FILTER(DATA, DATA[Parameter] IN {"Apple","Peach"}),
    "Parameter", DATA[Parameter],
    "Value", DATA[Value]
    )
    )

    This creates a table with Apple and Peach repeated.

    Use DuplicatedTable in your Table visual.

    If this solution helped you, please mark it as the accepted answer so it can help others as well.

    Best regards 

     

  • HanaOkugic 

     

    Why do you need to do this?  It seems very odd to introduce duplicated data when you'd normally want to be simplifying things.

     

    Phil

    • HanaOkugic's avatar
      HanaOkugic
      Regular Visitor

      The clients want to have a table in Power BI that is identical to the one they have in Excel. The issue is that some financial values are repeated multiple times, even though they should logically belong to different subcategories. However, in their data model there is only one parameter, and that same parameter is being used for both subcategories and this is how they originally built the table in Fabric. Because of that, I'm now running into limitations when trying to replicate the Excel structure.

  • v-venuppu's avatar
    v-venuppu
    Community Support

    Hi HanaOkugic ,

    Thank you for reaching out to Microsoft Fabric Community.

    Thank you PhilipTreacy Nabha-Ahmed ChielFaber amitchandak for the prompt response.

    I wanted to check if you had the opportunity to review the information provided and resolve the issue..?Please let us know if you need any further assistance.We are happy to help.

    Thank you.