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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
chat_peters
Helper III
Helper III

Create a column referencing indirect relationship between tables

Hello,

 

I need to create a calculated column in the Cat table (data model below) for filtering purposes. I want to see the total count of Period ID  for each Cat ID. Both fields are highlighted in yellow. I do not want to use USERELATIONSHIP.  PBIX File Link 

chat_peters_0-1699559997149.png

Thank you for taking the time to read!

1 ACCEPTED SOLUTION
lbendlin
Super User
Super User

lbendlin_0-1699894598823.png

 

Column = CALCULATE(DISTINCTCOUNT(Period[Period ID]),TREATAS({[Group ID]},Period[Group ID]))

 

What made you use the bidirectional relationship? I would change the data model to 

lbendlin_1-1699894647335.png

 

 

 

 

 

View solution in original post

1 REPLY 1
lbendlin
Super User
Super User

lbendlin_0-1699894598823.png

 

Column = CALCULATE(DISTINCTCOUNT(Period[Period ID]),TREATAS({[Group ID]},Period[Group ID]))

 

What made you use the bidirectional relationship? I would change the data model to 

lbendlin_1-1699894647335.png

 

 

 

 

 

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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