cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Reply
Dlahey
Helper I
Helper I

Leveraging Slicer to Dynamically Switch between Sales Teams

Hi,

 

I am looking to switch between three sales teams (Team 1, Team 2 and Team 3) where my raw data has three separate columns as they overlap the same zip codes. I have created a table for Alignment to switch between Teams and now when creating the DAX code I am unsure of how to link it to the data columns.

 

I have been able to create a slicer to switch between measures such as Gross Sales, Units, Net Sales which was based on values linking to a calculation.

 

I have tried the below code with no success:

 

Team Selection =
SWITCH( TRUE(),
    Values('Alignment Table'[Team Name]) = "NAD", lookupvalue(zip_to_territory[NAD Territory],
    Values('Alignment Table'[Team Name]) = "RAM", lookupvalue(zip_to_territory[RAM Territory],
    Values('Alignment Table'[Team Name]) = "IFS", lookupvalue(zip_to_territory[IFS Territory],  
 
    BLANK()))))
1 ACCEPTED SOLUTION

@Dlahey 

 

Thanks for your feedback and share your solution. That's great! Could you please kindly mark the solution to help the other members find it more quickly. Thank you very much!

 

Best Regards,

Community Support Team _ Caiyun

 

Best Regards,

Community Support Team _Caiyun

 

 

View solution in original post

3 REPLIES 3
Dlahey
Helper I
Helper I

thank you so much for the follow up - I fixed my issue - I needed to create a reference table which linked Zip Codes to a Team and Territory within the same columns (tripled the Zip Codes) instead of using 3 separate columns in my data feed table.

@Dlahey 

 

Thanks for your feedback and share your solution. That's great! Could you please kindly mark the solution to help the other members find it more quickly. Thank you very much!

 

Best Regards,

Community Support Team _ Caiyun

 

Best Regards,

Community Support Team _Caiyun

 

 

v-cazheng-msft
Community Support
Community Support

Hi @Dlahey , 

 

What kind of data types did you set for your NAD Territory, RAM Territory and IFS Territory columns? Could you please provide some sample data of your zip_to_territory table?

 

In addition, you can refer to the methods in these links:

Dynamic Hideable Columns in Power BI Table Visual - Microsoft Power BI Community

Dynamic Multiple Column Selection in Power BI - PowerBI Talks

 

Best Regards,

Community Support Team _ Caiyun

 

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

Thank you very much!

Helpful resources

Announcements
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors