You don't need the VALUES function. Since FILTER iterates through the rows of DATA, you can use a direct reference DATA[Serial] to refer to the value on the current row. However, using VALUES gives you a table of all DATA[Serial] values visible in the filter context where the measure is evaluated, which could be multiple values.
You should enclose 5 in quotes since you are comparing it with a text value
One solution is to keep your FILTER function as-is but remove VALUES:
Code:
=CALCULATE ( [Sum of Amount], FILTER ( DATA, LEFT ( DATA[Serial], 1 ) = "5" ) )
You can also write something like this, which I would prefer since it applies a filter only on the DATA[Serial] column rather than iterating/filtering the DATA table:
Code:
=CALCULATE ( [Sum of Amount], KEEPFILTERS ( LEFT ( DATA[Serial], 1 ) = "5" ) )
KEEPFILTERS ensures that the DATA[Serial] filter intersects with any other filters applied which should be in keeping with the intent of your original measure. You could probably omit KEEPFILTERS as long as you aren't applying any other filters that involve DATA[Serial].
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.