Can I use aggregate function in Calculated Field If-Else statements?

Just want to reflect these calculated field in QuickSight any idea how can I do?

case [Measure]
when “Page Views” then SUM([Number of Records])
when “Time Spent” then SUM([Total Time Spent])
when "Visitors’ then COUNTD([Client Id])
when “Conversations” then SUM([Converted])
else sum([Downloads])

You can us countif, sumif, avgif based on you required.