Parameter scale slicer with multiple conditions

jejnycta

New Member
Joined
Nov 18, 2016
Messages
7
I have the following "Scale" parameter table with 2 columns:
Overtime Hours WorkedValue
<2524
>=2525
>=5050
>=7575

<tbody>
</tbody>


Following is a sample "OT Data" table
EmployeeOT Hours Worked
John30
Mark60
Luke70
Mathew80
Joseph90

<tbody>
</tbody>



This is my attempt to create a DAX formula that when a slicer is selected such as >=75, the pivot table should show 2 instances (Mathew & Joseph) with total:170 OT Hours Worked:

ScaledOTWorked:=IF(HASONEVALUE(Scale[Value]),.......................... I only got this far. Please help

Thanks!!!!
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
Hi jejnycta,

1. Delete column [Value] (not necessary), and add new two columns:

MinMax
024
2549
5074
751000

<tbody>
</tbody>

2. In table 'OT_Data' add new column [Group] with next formula:
Code:
=CALCULATE(VALUES(Scale[Overtime Hours Worked]),FILTER(Scale,[OT Hours Worked]>=Scale[Min] && [OT Hours Worked]<=Scale[Max]))

3. Create PivotTable (use OT_Data)
- Row: Employee

4. Slicer: Group
 
Upvote 0
Thank you but I posted my question incorrectly. I apologize. When selecting the slicer I wanted a count of how many people for example worked equal to or greater than 30 hours - the answer I should get is 5 when I select the slicer >=25. Another example, when I select slicer >=50, I should get a count of 4 (Mark, Luke, Mathew and Joseph).

I strongly believe that the "HASONEVALUE" function has to come into play.
 
Upvote 0

Forum statistics

Threads
1,215,634
Messages
6,125,934
Members
449,274
Latest member
mrcsbenson

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top