Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
umairarshad
Helper II
Helper II

Merger or join or combine two matrix

Hello pbi users,

 

I need to merge/combine/join tow matrix.

umairarshad_0-1721038013979.png  umairarshad_1-1721038034284.png

I want to put the "GSE Count" column before "S/A" column.

Please help me out in this regard.

 

Regards,

 

 

 

 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @umairarshad ,

@bhanu_gautam Thanks for your concern about this case!

And @umairarshad , I'm guessing that the reason you have two columns of GSEs in your matrix is because you put Ageing in the Rows of the matrix, Status in the Columns of the matrix, and then you put GSEs in the Values, which by default returns a separate column of GSEs for each element in the Columns.

vjunyantmsft_0-1721094088465.png

You can try this way:
Here is my sample data:

vjunyantmsft_1-1721094384383.png

Use these DAXs to create measures:

S/A status = 
VAR _Count = 
CALCULATE(
    COUNT('Table'[Status]),
    'Table'[Ageing] = MAX('Table'[Ageing]) && 'Table'[Status] = "S/A"
)
VAR _Total = 
CALCULATE(
    COUNTROWS('Table'),
    ALLEXCEPT('Table', 'Table'[Ageing])
)
RETURN
_Count / _Total
U/S status = 
VAR _Count = 
CALCULATE(
    COUNT('Table'[Status]),
    'Table'[Ageing] = MAX('Table'[Ageing]) && 'Table'[Status] = "U/S"
)
VAR _Total = 
CALCULATE(
    COUNTROWS('Table'),
    ALLEXCEPT('Table', 'Table'[Ageing])
)
RETURN
_Count / _Total
Count of GSE = 
CALCULATE(
    COUNT('Table'[GSE]),
    ALLEXCEPT('Table', 'Table'[Ageing])
)

Place Ageing in the Rows of the matrix, don't put any fields in the Columns, and place the above three measures in the Values, and the final output is as below:

vjunyantmsft_4-1721094563843.png


Best Regards,
Dino Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

7 REPLIES 7
bhanu_gautam
Super User
Super User

Hi @umairarshad , you can do merge in Power Query editor

 

In the Power Query Editor, select one of the tables you want to merge.
Click on the "Home" tab, then select "Merge Queries".
Choose the second table you want to merge with the first one.
Select the columns you want to use for the join from both tables

And then create a matrix visual and you can reorder column accordingly

 

 




Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






You mean I can merge in same query?

 

umairarshad_0-1721040036280.png

 

Yes, if column are from same table or have relation 




Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






Thak you for the prompt response.

 

These above both matrix are from same query.

Go to first visual and pull GSE Count column in visual if it is from same table, and rest two column after it 




Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






I tried it already but it output two "Count of GSE" columns each for S/A and U/S column.

I want single count column

 

umairarshad_0-1721040256102.png

 

Anonymous
Not applicable

Hi @umairarshad ,

@bhanu_gautam Thanks for your concern about this case!

And @umairarshad , I'm guessing that the reason you have two columns of GSEs in your matrix is because you put Ageing in the Rows of the matrix, Status in the Columns of the matrix, and then you put GSEs in the Values, which by default returns a separate column of GSEs for each element in the Columns.

vjunyantmsft_0-1721094088465.png

You can try this way:
Here is my sample data:

vjunyantmsft_1-1721094384383.png

Use these DAXs to create measures:

S/A status = 
VAR _Count = 
CALCULATE(
    COUNT('Table'[Status]),
    'Table'[Ageing] = MAX('Table'[Ageing]) && 'Table'[Status] = "S/A"
)
VAR _Total = 
CALCULATE(
    COUNTROWS('Table'),
    ALLEXCEPT('Table', 'Table'[Ageing])
)
RETURN
_Count / _Total
U/S status = 
VAR _Count = 
CALCULATE(
    COUNT('Table'[Status]),
    'Table'[Ageing] = MAX('Table'[Ageing]) && 'Table'[Status] = "U/S"
)
VAR _Total = 
CALCULATE(
    COUNTROWS('Table'),
    ALLEXCEPT('Table', 'Table'[Ageing])
)
RETURN
_Count / _Total
Count of GSE = 
CALCULATE(
    COUNT('Table'[GSE]),
    ALLEXCEPT('Table', 'Table'[Ageing])
)

Place Ageing in the Rows of the matrix, don't put any fields in the Columns, and place the above three measures in the Values, and the final output is as below:

vjunyantmsft_4-1721094563843.png


Best Regards,
Dino Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.