Forum Discussion

nbufff's avatar
nbufff
Helper I
1 year ago
Solved

How to duplicate value in matrix visual

Dear Community, I was asked to duplicate some value from one group to other group, it is easy in excel but seemed stuck if that could be used by certain Measure in PBI. My Case:  I used below data t...
  • v-hashadapu's avatar
    v-hashadapu
    1 year ago

    Hi ,Thank you for reaching out to Microsoft Fabric Community Forum.

          We can do that by creating a new table that duplicates the rows for GroupB under both Team9 and Team 5 and then combining this table with the original one using DAX.

    1. Create a Duplicate Table:

    DuplicatedTable =

    SELECTCOLUMNS (

        FILTER (

            'Table',

            'Table'[Line_Name] = "GroupB" && 'Table'[VS] = "Team9"

        ),

        "MAV Date", 'Table'[MAV Date],

        "Line_Name", 'Table'[Line_Name],

        "VS", "Team 5",

        "Qty", 'Table'[Qty]

    )

    1. Create a Combined Table:

    CombinedTable =

    UNION (

        SELECTCOLUMNS (

            'Table',

            "MAV Date", 'Table'[MAV Date],

            "Line_Name", 'Table'[Line_Name],

            "VS", 'Table'[VS],

            "Qty", 'Table'[Qty]

        ),

        DuplicatedTable

    )

    3. Create a Measure for Total Quantity:

    Total Qty = SUM('CombinedTable'[Qty])

    4. Build a Matrix Visual

    5. output will look like this:

    If this helps, please mark it ‘Accept as Solution’, so others with similar queries may find it more easily. If not, please share the details.