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
seanmcc
Helper I
Helper I

Measures dependent on certain slicers

Hi all,

 

I am fairly new to Power BI and trying to create measures has been tricky, I have the following problem;

 

I have a set of slicers that allow me to select a drill. The data table provides the value for the selected drill.

The next step is to select two what if parameters - duration and sets.

As can be seen in my measure 'Drill 1 TD' I wish to calculate the value  from the selected drill (shown in table (average m.min)) and multiply it by the what if parameters. 

This works when only selections are made on the first set of slicers, but not if any other slicers are selected, for example drill 2 slicers.

 

Can I get the measures to work for their independent slicers?

 

Measure & Slicers Problem.png

 

I hope this makes sense?

Thank you for any help in advance.

 

Sean

 
 
 
1 ACCEPTED SOLUTION

Hi @seanmcc

 

If the 6 slicers are from the same table,and you need to sum the values from each 3 slicers ,you'd better create 6 separate tables for each slicer,otherwise it would make conflicts while filtering data.

Slicer is a kind of filter,even when you edit the interactions between visuals to none,when you calculate the sum values,it will check all the 6 slicers ,that is why you have values in each card,but have blank in total.

You can use below dax expression to create 6 separate tables:

 

table =DISTINCT('Table'[Column])

 

Then for the details,you can check the previous reply I made.

 

Best Regards,
Kelly
Did I answer your question? Mark my post as a solution!

View solution in original post

5 REPLIES 5
v-kelly-msft
Community Support
Community Support

Hi  @seanmcc ,

 

Are all the data in slicers from different tables?If so,just create a measure as below:

 

Measure = SELECTEDVALUE('Table'[Column1])*SELECTEDVALUE('Table 2'[Column2])*SELECTEDVALUE('Table 3'[Column3])

 

And you will see:

Annotation 2020-05-01 163808.png

Best Regards,
Kelly
Did I answer your question? Mark my post as a solution!
 

@v-kelly-msft 

 

My slicers for the drill category and drill are from the same table 'Drill Data'. Please see sample of this table below;

 

NameDateDay NameMatchday (+/-)Position NameSession TypeDrill IDPeriod NameTotal DurationTotal Distance (m)Meterage Per Minute
Player 104/03/2019MondayMD -52. Full BackTeam Training Attacking Drill1299284.3
Player 204/03/2019MondayMD -55. Central MidfielderTeam Training Attacking Drill1284571.8
Player 304/03/2019MondayMD -54. Wide MidfielderTeam Training Attacking Drill1286773.7
Player 406/03/2019WednesdayMD -32. Full BackTeam Training Attacking Drill763691.3
Player 506/03/2019WednesdayMD -35. Central MidfielderTeam Training Attacking Drill747568.2
Player 606/03/2019WednesdayMD -36. StrikerTeam Training Attacking Drill749170.5
Player 720/03/2019WednesdayIB2. Full BackTeam Training 1 vs 0 - S116165.2
Player 120/03/2019WednesdayIB2. Full BackTeam Training 1 vs 0 - S114649.8
Player 720/03/2019WednesdayIB5. Central MidfielderTeam Training 1 vs 0 - S115963.3
Player 401/08/2019ThursdayPS2. Full BackTeam Training Attacking Drill19108157.7
Player 501/08/2019ThursdayPS5. Central MidfielderTeam Training Attacking Drill19106656.8
Player 601/08/2019ThursdayPS6. StrikerTeam Training Attacking Drill1986646.2

 

I have managed to get the value I need from each group of slicers by modifying the interactions.

I will try step out how I got to this point and perhaps you can see if there is any issues.

 

1. I need to find the average of the drill selected, which works for me, I modified interactions to ensure the second set of slicers do not interact.

Drill AVG m.min = IF(ISFILTERED('Drill Data'[Period Name]),AVERAGEX('Drill Data',[Meterage Per Minute]),0)
 
2. I can now select the set duration and number of sets from my what if parameters. Which are used in my measure;
Drill 1 Est TD = [Drill AVG m.min]*[Drill 1 Sets Value]*[Drill 1 Duration Value]
 
Drill 2 Est TD = [Drill AVG m.min]*[Drill 2 Sets Value]*[Drill 2 Duration Value]
 
3. I need to sum these values together to get the total;
Drill Total = [Drill 1 Est TD]+[Drill 2 Est TD]
 
My expected result in this case should be 155 but it is returning Blank. I have turned off all interactions for this card. I thought this would be a straightforward sum but I must be doing something wrong somewhere along the way.
 
Drill Total.jpg
 
Thanks in advance
Sean
 
 
 

Hi @seanmcc

 

If the 6 slicers are from the same table,and you need to sum the values from each 3 slicers ,you'd better create 6 separate tables for each slicer,otherwise it would make conflicts while filtering data.

Slicer is a kind of filter,even when you edit the interactions between visuals to none,when you calculate the sum values,it will check all the 6 slicers ,that is why you have values in each card,but have blank in total.

You can use below dax expression to create 6 separate tables:

 

table =DISTINCT('Table'[Column])

 

Then for the details,you can check the previous reply I made.

 

Best Regards,
Kelly
Did I answer your question? Mark my post as a solution!

Thanks @amitchandak for the reply.

Please see the image attached. I have made sure that there are no interactions between the slicers in first group with any other slicer groups. My measure 'Drill 1 TD' is displayed in a table on the right, however there is something wrong as there is no value.

I should be expecting to see a value of 179.74

89.87 (value in table below drill slicer) x 2 (number of sets) x 1 (duration of set).

 

Is the measure calculating the right thing?

Interactions.jpg

Thanks

Sean

 

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.