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

Join the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now

Reply
rakesh-k01
Frequent Visitor

Matrix on the same column

Hi,

 

I have 2 tables having 1 to many relationship with the ref2per table. Capture.PNG

 

I' am trying to get a matrix something like below:

 

nameSAPPCSEventBrite
SAP  1
PCS 1 
EventBrite1 1

SAP and EventBrite has count 1 since person id 1 is shared between them. Same applies on the other way round.  Since person id 2 has only one reference, the value is 1 for matrix EventBrite to EventBrite. 

 

Just using the UI I'am getting the below result.

Capture3.PNG

 

 

 

 

 

 

 

 

 

 I'am still a rookie with the DAX commands, so any thoughts on how the required result can be achieved. 

 

Thanks

Rakesh

 

1 ACCEPTED SOLUTION
v-qiuyu-msft
Community Support
Community Support

Hi @rakesh-k01,

 

You can create calculated columns in ref2per table like below:

 

Name = RELATED('ref_table'[name])

 

Name(update) = var t=CALCULATE(MAX('ref2per'[ref_source_system_id]),ALLEXCEPT(ref2per,'ref2per'[personal_id]))
return
IF('ref2per'[ref_source_system_id]<> t,CALCULATE(MIN('ref2per'[Name]),ALLEXCEPT(ref2per,'ref2per'[personal_id])),
 CALCULATE(MAX('ref2per'[Name]),ALLEXCEPT(ref2per,'ref2per'[personal_id])))

 

q4.PNG

 

Best Regards,
Qiuyun Yu

Community Support Team _ Qiuyun Yu
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

2 REPLIES 2
v-qiuyu-msft
Community Support
Community Support

Hi @rakesh-k01,

 

You can create calculated columns in ref2per table like below:

 

Name = RELATED('ref_table'[name])

 

Name(update) = var t=CALCULATE(MAX('ref2per'[ref_source_system_id]),ALLEXCEPT(ref2per,'ref2per'[personal_id]))
return
IF('ref2per'[ref_source_system_id]<> t,CALCULATE(MIN('ref2per'[Name]),ALLEXCEPT(ref2per,'ref2per'[personal_id])),
 CALCULATE(MAX('ref2per'[Name]),ALLEXCEPT(ref2per,'ref2per'[personal_id])))

 

q4.PNG

 

Best Regards,
Qiuyun Yu

Community Support Team _ Qiuyun Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @v-qiuyu-msft

 

Awesome! That worked. Thanks a ton.

 

Thanks & Regards,

Rakesh

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

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

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.

FabCon and SQLCon Highlights Carousel

FabCon & SQLCon Highlights

Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.