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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
harold191
New Member

cross matrix

I have a problem with a cross matrix.
I need to count people who, being in a classification, are also in other classifications.

Example
Table
Classification | IdPerson

           A        |        1
           A        |        2
           B        |        1
           B        |        2
           B        |        3
           C        |        2
           C        |        3

 

Matrix I should get
   | A | B | C
A | 0 | 1 | 1
B | 1 | 0 | 2
C | 1 | 2 | 0

 

As you can see, at the crossroads between classification A and B, there is a person who is in both, in A and C there is a person who repeats, in B and C there are two people who are in both classifications and so with all crosses that can be formed.

1 ACCEPTED SOLUTION
Ashish_Mathur
Super User
Super User

Hi,

Your expected result is wrong.  The answer for A/B and B/A should be 2 (not 1).  You may download my PBI file from here.

Hope this helps.

Untitled.png


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

13 REPLIES 13
Ashish_Mathur
Super User
Super User

Hi,

Your expected result is wrong.  The answer for A/B and B/A should be 2 (not 1).  You may download my PBI file from here.

Hope this helps.

Untitled.png


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

@Ashish_Mathur Could you please help me to resolve the same data.

 

Not sure if i have recreated the same way you did. but i couldn't get the exact result as you have got.

For sure i am missing something. Could you please help me.

Cross selling.png

Hi,

Share the link from where i can download your PBI file.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Hi @Ashish_Mathur Unfortunately my organisationdoesn't allow to share the content(Blocked).

 

I have used the same kind of data and the columns as it in your file. But not suse am i missing something from it.

I could see only the 0 for the cross reports.

May i please ask you to build one Pbix file for the data i have shared.

 

Sorry!

 

Regards,

Ranjan

Hi,

I am willing to help you but i need to work with your file to know what the problem is.  Please share the file from your Home computer/another computer.  It actually will take quite some time for me to rebuild everything.

Thank you for your understanding.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Thanks @Ashish_Mathur .

 

Here is the link, Kindly check and let me know if you can't access this file.

 

https://drive.google.com/file/d/1Rweg27SHcFDZ8EUBCK_EQeaipfqi8OhV/view?usp=sharing 

 

Kindly let me know. what is the problem in this file.

 

Regards,

Ranjan

 

Hi,

Make the second relationship inactive.

Hope this helps.

Untitled.png


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Thanks a lot @Ashish_Mathur  it did work.

 

 

You are welcome.  If my reply helped, please mark it as Answer.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

I am willing to but i don't have that option. Probebly because i have replied to the old post?

@Ashish_Mathur Can you please help me the below case.

 

I have tried the same like you have mentioned. Not sure why i am getting only the Zeros. Am i missing something from this?

 

Sample data

SSLUDN
BTS1011471332
PAS1011471332
PAS1011471335
BTS1011471332
BTS1011471335

 

Cross selling.png

Hi Anish,

 

I downloaded your file and tried to make a matrix with your data right next to the one provided it and I get a "Can't display the visual" error. I have it set up the same way as yours in the same file too. Image of the Error 

 

 

Any idea what I am doing wrong?

Hi,

Click on the Format icon in the visualisation pane and remove all totals.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.