
1. Re: Using a Parameter within a Calculated Field
Sarah Ebreo Jan 4, 2017 9:55 AM (in response to ryan.shukis)Hi Ryan,
Try replacing [Dollars Units] in the desired formula with the name of the calculated field in your third point. You may need to aggregate the YEAR([Date]) as well by using the ATTR function. Does the following calculation work?
IF ATTR(YEAR([Date])) = 2013 THEN [Calculated Field] END
Where [Calculated Field] is defined as:
CASE [Dollars Units]
WHEN 'Units' THEN SUM([Quantity])
WHEN 'Dollars' THEN SUM([Sales])
END
Or you could write it in a single calculated field as:
IF ATTR(YEAR([Order Date])) = 2013 THEN
(CASE [Dollars Units]
WHEN 'Units' THEN SUM([Quantity])
WHEN 'Dollars' THEN SUM([Sales])
END)
END
Best,
Sarah 
2. Re: Using a Parameter within a Calculated Field
ryan.shukis Jan 4, 2017 1:24 PM (in response to Sarah Ebreo)Hi Sarah!
Thank you! It almost works. The only remaining part is that when I pull this new calculated field over to the measures area of the table, no field label or numbers display. So the current field label is " '13 " but it doesn't show up. However this new field does work if I pull over the "Date" dimension into column labels, then the numbers show up.
IF ATTR(YEAR([Date])) = 2013 THEN
(CASE [Dollars Units]
WHEN 'Units' THEN SUM([Units])
WHEN 'Dollars' THEN SUM([Sales])
END)
END

3. Re: Using a Parameter within a Calculated Field
Sarah Ebreo Jan 4, 2017 2:03 PM (in response to ryan.shukis)Hey Ryan,
I removed the aggregation from the calculated field and was able to get the data to without Date on Columns. Try the following calculation and let me know if it works for you:IF YEAR([Order Date]) = 2013 THEN
(CASE [Dollars Units]
WHEN 'Units' THEN [Units]
WHEN 'Dollars' THEN [Sales]
END)
END
Sarah

4. Re: Using a Parameter within a Calculated Field
ryan.shukis Jan 5, 2017 1:53 AM (in response to Sarah Ebreo)Thank you so much Sarah! This worked perfectly!