Forum Discussion
How to duplicate value in matrix visual
- 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]
)
- 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.
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]
)
- 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.
Thanks for your update. If there's no other way around, I accepted that as the solution.