cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
slukas Frequent Visitor
Frequent Visitor

Merge column from two tables to create one common slicer

I have two simialar tables that have similar data.  One has a start location, a few other data fields, and an expense amount.  The other has a destination location, a few other data fields, and a different expense amount.  For my presentation I have two charts.  One chart shows the start location expenses.  The other shows the destination expenses.  I am attempting to create a single slicer that filters both locations.  The number of locations is limited.  To solve the problem for the short term I created a new table with the "Enter Data" option and typed in the twenty or so locations in the current data set.  I created a relationship between the entered table and both of my other two tables.  This is not ideal as other locations my pop up.  How can I create my entered "location" table dynamically based on the two data tables?

Steve

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
msornakumar Regular Visitor
Regular Visitor

Re: Merge column from two tables to create one common slicer

Hi,

 

  A calulate table can be used for the below purpose. Check the below Pseudocode

 

LocationTbl = 
VAR StartLocation =
    SELECTCOLUMNS ( SL, "StartLocation", SL[StartLocation] )
VAR EndLocation =
    SELECTCOLUMNS ( EL, "EndLocation", EL[EndLocation] )
RETURN
    DISTINCT(UNION ( StartLocation, EndLocation ))
2 REPLIES 2
Highlighted
msornakumar Regular Visitor
Regular Visitor

Re: Merge column from two tables to create one common slicer

Hi,

 

  A calulate table can be used for the below purpose. Check the below Pseudocode

 

LocationTbl = 
VAR StartLocation =
    SELECTCOLUMNS ( SL, "StartLocation", SL[StartLocation] )
VAR EndLocation =
    SELECTCOLUMNS ( EL, "EndLocation", EL[EndLocation] )
RETURN
    DISTINCT(UNION ( StartLocation, EndLocation ))
slukas Frequent Visitor
Frequent Visitor

Re: Merge column from two tables to create one common slicer

Thanks.  Just what the newbi needed Smiley Happy

Helpful resources

Announcements
Virtual Launch Event

Microsoft Business Applications October Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

Power BI Helps Homeless and Trouble Youth

Power BI Helps Homeless and Trouble Youth

We spoke with Power BI Super User, Greg Deckler, about his charity work

MBAS Gallery

Watch Sessions On Demand!

Continue your learning in our online communities.

Top Kudoed Authors
Users Online
Currently online: 284 members 2,970 guests
Please welcome our newest community members: