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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
powerbihelp123
Regular Visitor

How to slice data for several columns

Project IDProject Owner NameProject Owner IDManagerManager IDProject Details
AJeff123Mike789etc
BJohn234Matt678etc
CJack345John234etc

 

ManagersManager ID
Mike789
Matt678
John234

I have two tables. One table has Managers and their ID. The other main table has all of my data including two columns with the project owner ID and their manager's ID. Sometimes the manager is also a project owner. In Power BI I am trying to set up a lot of data visuals, with a slicer of different manager to show each manager's projects hour contributions. How do I set up the slicer/Power BI so that the ID column from the manager table is connected to both Project owner and Manager in the main table, so that my slicer of managers when one manager is clicked, all the visuals will update so that they contain project info where the manager is project owner as well as the manager's employees under them. 

Right now I have tried to make two relationships, from Manager ID to Manager ID and Manager ID to Project Owner ID, but Power BI only lets one relationship to be active at once. 

 
 
1 ACCEPTED SOLUTION
ryan_mayu
Super User
Super User

@powerbihelp123 

do not create relationship between two tables.

create a measure

Measure = if(max('Table'[Manager])=max(Manager[Managers])||max(Manager[Managers])=max('Table'[Project Owner Name]),1)
and add this measure to visual filter and set to 1
11.png
 
pls see the attachment below




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

Proud to be a Super User!




View solution in original post

6 REPLIES 6
Ashish_Mathur
Super User
Super User

Hi,

These Power steps will allow you to work with slicers

let
    Source = Excel.CurrentWorkbook(){[Name="Data"]}[Content],
    #"Unpivoted Other Columns" = Table.UnpivotOtherColumns(Source, {"Project ID","Project Details"}, "Attribute", "Value"),
    #"Replaced Value" = Table.ReplaceValue(#"Unpivoted Other Columns","Manager","Manager Name",Replacer.ReplaceValue,{"Attribute"}),
    #"Split Column by Delimiter" = Table.SplitColumn(#"Replaced Value", "Attribute", Splitter.SplitTextByEachDelimiter({" "}, QuoteStyle.Csv, true), {"Designation", "Attribute.2"}),
    #"Pivoted Column" = Table.Pivot(#"Split Column by Delimiter", List.Distinct(#"Split Column by Delimiter"[Attribute.2]), "Attribute.2", "Value")
in
    #"Pivoted Column"

Hope this helps.

Ashish_Mathur_0-1750989717692.png

 


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

@powerbihelp123 

do not create relationship between two tables.

create a measure

Measure = if(max('Table'[Manager])=max(Manager[Managers])||max(Manager[Managers])=max('Table'[Project Owner Name]),1)
and add this measure to visual filter and set to 1
11.png
 
pls see the attachment below




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

Proud to be a Super User!




Thanks for your help. Would this be possible if Project Owners are a measure that concatenates several different project owners if they have the same project ID? I have a separate measure for that, so was wondering if I could do something like "if contains" or something of that sort. 

do you mean multiple seleciton or something else? could you pls update the sample data and expected output?





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

Proud to be a Super User!




Hi @powerbihelp123 

I wanted to follow up on your question regarding the possibility of using a measure to concatenate multiple project owners based on the same project ID.

To assist you more effectively, could you please provide the sample data and the expected output? This will help us understand your requirements better and offer a more targeted solution.

Thank you for your cooperation, and I look forward to your response!

 

Hi @powerbihelp123 

Just following up on my earlier request for some sample data and the expected output regarding your question about using a measure to concatenate multiple project owners by project ID.

Sharing this information will really help us better understand your scenario and suggest the most suitable solution.

Looking forward to your response.
thank you for your cooperation!

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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