If you ate 2,875 calories, with 575 coming from fats and 230 coming from sugars, then your percentage intake of fats for the day is 575/2875, and your percentage intake of sugars for the day is 230/2875.
Calories from fats: 575/2875 = 0.2 = 20%
Calories from sugars: 230/2875 = 0.08 = 8%