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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
powerbihelp123
New Member

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. 

 
 
4 REPLIES 4
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!




Helpful resources

Announcements
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 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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