Disconnected slicers feeding in a number to a formula

masplin

Active Member
Joined
May 10, 2010
Messages
413
I'm sure this is simple but just get it to work

I have a formula with an input of "2"
Code:
CALCULATE(min(transactions[Date]),transactions[Redeem Rank]=2)

I want to be able to vary the input between 2 and 10. So I thought create a disconnected slicer. Created a new table with values 2 to 10 called "Action2" in a column called "2nd Action"

I added the slicer to the pivot and clicked on 2. I then replaced the "2" in my formula with values(Action2[2nd Action])

Code:
CALCULATE(min(transactions[Date]),transactions[Redeem Rank]=values(Action2[2nd Action]))

So far so good and seems to be working. However I then thought I would put the 2nd Action on the pivot columns, but I have more than one choice selected in the column labels drop down I get this error.

[TABLE="width: 1001"]
<colgroup><col width="1001"></colgroup><tbody>[TR]
[TD="class: xl173, width: 1001"]ERROR - CALCULATION ABORTED: Calculation error in measure 'users'[Day 1st Redeem-2nd Redeem]: A table of multiple values was supplied where a single value was expected.[/TD]
[/TR]
</tbody>[/TABLE]

If I choose one value of "2nd Action" for column labels it works fine. Could someone correct my logic please?

Thanks Mike
 

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.
Create a new measure Action= MAx[Action2], where you can use the ACtion 2 table with the column where the numbers are from 2 to 10 as a slicer. Which ever value you select in your slicer that would we reflect in you measure.

=
CALCULATE(min(transactions[Date]),transactions[Redeem Rank]=[Action])</PRE>
 
Upvote 0

Forum statistics

Threads
1,223,931
Messages
6,175,465
Members
452,646
Latest member
tudou

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