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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

Reply
Konrad_Schargel
Frequent Visitor

Calculator to aligment sales reps to a region

Hi everyone, 

Is the first time that I write a post here so I don't know if I am doing by the right way. 

 

I would need you're help to know if is this request is possible or not. 


I want to develop a dashboard to the commercial director. I have 2 tables, one with a column with the regions (Zone 1, Zone 2, etc.. ) and other column with the default sales reps assigned and a second table with the name of the reps. 


The commercial director wants to change the territory to a other new sales reps and he wants to do it in the dashboard with a slicer or something like that. 


Is possible assign a new territory to a new user directly in the dashboard with some Dax measure? 

 

I want to considerer this option first before use an external excel. 

 

Could you help me please? 


Thank you

1 ACCEPTED SOLUTION
v-jianboli-msft
Community Support
Community Support

Hi @Konrad_Schargel ,

 

You can't change your original data by changing the report, but if you just want to modify the report, you can try this:

Based on your description, I have created a simple sample:

vjianbolimsft_0-1680054990265.png

vjianbolimsft_1-1680055001587.png

First, create a new table for slicer:

Table 2 = CROSSJOIN(VALUES('Table'[Regions]),VALUES('Table (2)'[the name of the reps]))

vjianbolimsft_2-1680055027656.png

Then use the new table to create a slicer:

vjianbolimsft_3-1680055065834.png

Applt the measure to the table visual:

Measure = 
IF (
    ISFILTERED ( 'Table 2' )
        && MAX ( 'Table'[Regions] ) IN SELECTCOLUMNS ( 'Table 2', "Regions", [Regions] ),
    MAXX (
        FILTER ( 'Table 2', [Regions] = MAX ( 'Table'[Regions] ) ),
        [the name of the reps]
    ),
    MAX ( 'Table'[the default sales reps assigned] )
)

 

vjianbolimsft_4-1680055143364.png

Final output:

vjianbolimsft_5-1680055176852.png

Best Regards,

Jianbo Li

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

View solution in original post

2 REPLIES 2
v-jianboli-msft
Community Support
Community Support

Hi @Konrad_Schargel ,

 

You can't change your original data by changing the report, but if you just want to modify the report, you can try this:

Based on your description, I have created a simple sample:

vjianbolimsft_0-1680054990265.png

vjianbolimsft_1-1680055001587.png

First, create a new table for slicer:

Table 2 = CROSSJOIN(VALUES('Table'[Regions]),VALUES('Table (2)'[the name of the reps]))

vjianbolimsft_2-1680055027656.png

Then use the new table to create a slicer:

vjianbolimsft_3-1680055065834.png

Applt the measure to the table visual:

Measure = 
IF (
    ISFILTERED ( 'Table 2' )
        && MAX ( 'Table'[Regions] ) IN SELECTCOLUMNS ( 'Table 2', "Regions", [Regions] ),
    MAXX (
        FILTER ( 'Table 2', [Regions] = MAX ( 'Table'[Regions] ) ),
        [the name of the reps]
    ),
    MAX ( 'Table'[the default sales reps assigned] )
)

 

vjianbolimsft_4-1680055143364.png

Final output:

vjianbolimsft_5-1680055176852.png

Best Regards,

Jianbo Li

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

It works perfectly!  

 

Thank you very much for your help. 

 

Best regards,
Konrad

Helpful resources

Announcements
Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

Check out the February 2024 Power BI update to learn about new features.

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.