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.
Hi all,
I have the following snowflake datamodell with the following tables:
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:
Visually I am trying to achieve the following:
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.
Any suggestion on how I can achieve this using a measure?
Solved! Go to Solution.
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.
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.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
118 | |
104 | |
77 | |
73 | |
52 |
User | Count |
---|---|
145 | |
109 | |
109 | |
90 | |
64 |