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
Anonymous
Not applicable

Show two seperatly filtered visuals on same table

Hi all,

 

I have the following snowflake datamodell with the following tables:

  • All Sales, which containes all sales data
  • Sales Person contains information about the sales staff
  • Based on if the sales person is internal or external, information about the business unit or the external businessis stored in the Business Unit or External Business Table

image.png

 

My table has one slicer, where I can select a single sales person and I am trying to show the following information in this table:

  •  Information about the selected sales person: name, name of business unit and total sales
  •  Based on the business unit the sales person is in, I would look to show information about the business unit, such as all sales staff in the business unit, name of the business unit and total sales for each sales person.

Visually I am trying to achieve the following:

image.png

However, since my slicer already limits the data in the All Sales table to sales data of the Sales Person Alois, I decided to use measures to calculate the Ranking Sales Person in Business Unit visual (I am open to other suggestions, if this is not the right approach).

 

To calculate the total sales, I use the following measure:

 

Total Sales =
CALCULATE (
    SUM ( 'AllSales'[Sales] ),
    ALL ( 'AllSales'),
    FILTER (
        'BusinessUnit',
        'BusinessUnit'[Name] = SELECTEDVALUE('BusinessUnit'[Name])
    )
)

 

Now I am stuck calculating the corresponding name of each sales person that relates to the sales.

 

image.png

Any suggestion on how I can achieve this using a measure?

1 ACCEPTED SOLUTION
Icey
Community Support
Community Support

Hi @Anonymous ,

 

It is suggested to create another independent table for your slicer, like:

SalesPersonSlicer = VALUES('All Sales'[Sales Person])

 

Then, use it as a slicer. And create measures like so:

Measure 1 =
IF (
    MAX ( 'All Sales'[Sales Person] )
        = SELECTEDVALUE ( 'SalesPersonSlicer'[Sales Person] ),
    1
)
Measure 2 =
VAR SelectedBusinessUnit =
    CALCULATE (
        MAX ( 'All Sales'[Business Unit] ),
        FILTER ( 'All Sales', [Measure] = 1 )
    )
RETURN
    IF ( MAX ( 'All Sales'[Business Unit] ) = SelectedBusinessUnit, 1 )

 

Then, put [Measure 1] in table visual 'Sales Person Overview' and set as 1. And put [Measure 2] in another table visual and set as 1.

 

 

Best Regards,

Icey

 

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
Icey
Community Support
Community Support

Hi @Anonymous ,

 

It is suggested to create another independent table for your slicer, like:

SalesPersonSlicer = VALUES('All Sales'[Sales Person])

 

Then, use it as a slicer. And create measures like so:

Measure 1 =
IF (
    MAX ( 'All Sales'[Sales Person] )
        = SELECTEDVALUE ( 'SalesPersonSlicer'[Sales Person] ),
    1
)
Measure 2 =
VAR SelectedBusinessUnit =
    CALCULATE (
        MAX ( 'All Sales'[Business Unit] ),
        FILTER ( 'All Sales', [Measure] = 1 )
    )
RETURN
    IF ( MAX ( 'All Sales'[Business Unit] ) = SelectedBusinessUnit, 1 )

 

Then, put [Measure 1] in table visual 'Sales Person Overview' and set as 1. And put [Measure 2] in another table visual and set as 1.

 

 

Best Regards,

Icey

 

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

Anonymous
Not applicable

This definitly helped me to get back on track. Thanks @Icey 

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.