VALUES() equivalent for multiple selection in a slicer

gLb89

New Member
Joined
Aug 1, 2017
Messages
1
[FONT=&quot]Hi,[/FONT]
[FONT=&quot] [/FONT]
[FONT=&quot]I am currently working on a portfolio analysis model where I need to do a specific operation on multiple selected deals.[/FONT]
[FONT=&quot] [/FONT]
[FONT=&quot]My goal here is to be able to run the CALCULATE() on more than one selection. Currently I can do it with one selection in my slicer using the VALUES() formula. It doesn't look like VALUES() can handle more than one selection because I keep getting the error: " A table of multiple values was supplied where value was expected"[/FONT]
[FONT=&quot]
In the filter of my CALCULATE I want the DimDeals table to find the selected deals of my slicer and then do the calculation only for those selected deals. What should I do to be able to CALCULATE on more than one selection? Can it be done in Power BI?[/FONT]

[FONT=&quot] [/FONT]
[FONT=&quot]See below a quick example of what I am trying to do:[/FONT]
[FONT=&quot] [/FONT]
[FONT=&quot]Sensies_MultipleDEALS = CALCULATE(SUM([CashFlow]),DimDeals[DealName]=VALUES(DimDeals_Sensies[DealName_Sensies]))[/FONT]
[FONT=&quot] [/FONT]
[FONT=&quot]where DimDeals_Sensies (slicer to select which deals to do the calculate on) is a table with all the name of the deals. I want to be able to select more than one deal.[/FONT]
[FONT=&quot] [/FONT]
[FONT=&quot]The other deals that are not selected will have their own calculation but once I figure how to filter with multiple selection I guess it should be easy to do.[/FONT]
[FONT=&quot] [/FONT]
[FONT=&quot]DimDeals_Sensies slicer[/FONT]
[FONT=&quot]Deal 1 Selected[/FONT]
[FONT=&quot]Deal 2 Not Selected[/FONT]
[FONT=&quot]Deal 3 Not Selected[/FONT]
[FONT=&quot]Deal 4 Selected[/FONT]
[FONT=&quot]Deal 5 Not Selected[/FONT]
[FONT=&quot] [/FONT]
[FONT=&quot]By selecting the Deal 1 and the Deal 4 my measure should return the sum of the Cashflows only for those deals:

[/FONT]

[FONT=&quot]Deal 1 Sum(CashFlows)[/FONT]
[FONT=&quot]Deal 2 0[/FONT]
[FONT=&quot]Deal 3 0[/FONT]
[FONT=&quot]Deal 4 Sum(CashFlows)[/FONT]
[FONT=&quot]Deal 5 0[/FONT]
[FONT=&quot] [/FONT]
[FONT=&quot]Thank you![/FONT]
 

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.
I don't think I understand what you are tying to do at all. Why isn't the slicer just on the [Deal Name] column without the CALCULATE at all? If you need the separate DimDeals_Sensies for some reason (maybe it is a reduced list), then just create a relations ship between the two tables.
 
Last edited:
Upvote 0
For the record, the issue you are reporting is not with VALUES(), but with your FILTER() expression. VALUES() is returning a table of more than one row, but you are comparing the returned table to a single value in [DealName] and the formula engine does not like that.

Otherwise, I echo gazpage's comment.
 
Upvote 0

Forum statistics

Threads
1,215,430
Messages
6,124,851
Members
449,194
Latest member
HellScout

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