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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Anonymous
Not applicable

Count values in a column only if values are part of another dimension table

Hi folks,

 

Capture.JPG

As you can see, there are 2 different teams working on a same pool of tickets. ‘Team Members’ of both [Local_Team] and [Regional_Team] are connected to the ‘Assigned to’ column with 1-to-Many relation.

 

All I need is a count of ‘Ticket Number’ which were Assigned to the Local Team members, and an average of tickets assigned per person from the Local Team.

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

Hi @Anonymous ,

 

Try to do like this.

(Please refer to the .pbix file.)

ddd1.PNG

 

Best regards,
Lionel Chen

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

3 REPLIES 3
v-lionel-msft
Community Support
Community Support

Hi @Anonymous ,

 

Try to do like this.

(Please refer to the .pbix file.)

ddd1.PNG

 

Best regards,
Lionel Chen

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

 

Ashish_Mathur
Super User
Super User

Hi,

Here's what i think you should do.

  1. In the Query Editor, insert a column in the Local_Team table with the word Local in the individual cells (name this new column as Team).
  2. In the Query Editor, insert a column in the Regional_Team table with the word Regional in the individual cells (name this new column as Team).
  3. Append the Local_Team and Regional_Team tables
  4. Create a Many to One relationship from Assigned To column of the Assigned_Tickets table to the Team Members column of the appended table
  5. To your visual, drag Team from the appended table
  6. Write this measure

Tickets = COUNTROWS(Assigned_Tickets)

Hope this helps.

 


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

@Anonymous can you share sample data and what is your expectations on final output?



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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