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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.

Top Solution Authors