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
amanda_wahlig
Frequent Visitor

Creating Calculated Column Based on Multiple Tables and Filtering

I have multiple tables tracking the work of our staff (completely different types of work items means we can't use the same table to track it all) - each work item is assigned to a staffer, so obviously there are many rows with the same staffer's name . Not every staffer is in every table.

 

I have a report where I have visuals from the different tables, and I would like to have a slicer where I can filter all the visuals based on a staffer's name.

 

I'm pretty sure that the best way to do this is to combine the staffer name columns from each table into a new table, then filter out the repeats (or is that step even necessary)?

 

I welcome any tips, suggestions, or code.

2 ACCEPTED SOLUTIONS
Idrissshatila
Super User
Super User

hello @amanda_wahlig ,

 

yes, have a dimension table that have the distinct staff names and link it to all the tables with the records.

 

then you can see the data from all tables with this staff name from the dimension table.



Did I answer your question? Mark my post as a solution! Appreciate your Kudos
Follow me on LinkedIn linkedIn
Vote for my Community Mobile App Idea

Proud to be a Super User!




View solution in original post

audreygerred
Super User
Super User

Hello! Ideally you always want to model to a star schema (fact and dimensions). The employee table would be a dimension table in this case and the joins to the fact tables allow the fact tables to be used together in a visual through fields from the dimension. Here is a blog I wrote about star schema: http://powerbiwithme.com/2023/07/30/the-star-schema-edition/ 




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





View solution in original post

4 REPLIES 4
amanda_wahlig
Frequent Visitor

I was more looking for tips on creating that dimension table with all the names, but I appreciate it. I wound up extracting the columns with attorney names into new tables and merging queries, then removing duplicates.

amanda_wahlig
Frequent Visitor

I was mostly looking for tips on how to create the dimension table. I wound up referencing the needed columns and appending them into a new table, then removing duplicates. That way we don't have to manually change the reference table.

audreygerred
Super User
Super User

Hello! Ideally you always want to model to a star schema (fact and dimensions). The employee table would be a dimension table in this case and the joins to the fact tables allow the fact tables to be used together in a visual through fields from the dimension. Here is a blog I wrote about star schema: http://powerbiwithme.com/2023/07/30/the-star-schema-edition/ 




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Idrissshatila
Super User
Super User

hello @amanda_wahlig ,

 

yes, have a dimension table that have the distinct staff names and link it to all the tables with the records.

 

then you can see the data from all tables with this staff name from the dimension table.



Did I answer your question? Mark my post as a solution! Appreciate your Kudos
Follow me on LinkedIn linkedIn
Vote for my Community Mobile App Idea

Proud to be a Super User!




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.