Dropdown/button for sum and mean

I want to know how can the following be done. I am new to Dash so please help me out.

I have created an app for getting summary statistics from a given dateset. So if someone tries to get the top 10 values of something, I want to be able to give the user an option of displaying the output as the sum of the target value or the average.

thanks in advance.