The map you showed in the picture only counts as 24pp because it's weighted 28%, all lower pp scores became weighted less, which ended up giving you only 5 pp in total.
From the link Frolski posted:
click hereWhy did I only gain 30pp when the map I played gives 100pp?
PP is a weighted system. This means that your highest pp score gives 100% of its pp, the next one 95% and so on. So your 100pp score may only be weighted around 30%. This does not, however, mean that you actually get a 100% pp gain, even if you set a new personal top performance, as every other score you have will be weighted less than they did before. It's quite easy if you think about it for a little bit:
Let's imagine that your top rank only has 2 maps and looks like this:
#1. 100pp, weighted 100%
#2. 100pp, weighted 95%
Your total pp will then be 100 + 95 = 195pp. If you now set a 110pp score, your top rank will look like this:
#1. 110pp, weighted 100%
#2. 100pp, weighted 95%
#3. 100pp, weighted 90%
As you can see, your new total pp is not 195 + 110 = 305pp, but 110 + 95 + 90 = 295pp.
I am pretty sure the same applies to every other mode.
Also, retries does not affect the pp you get as far as I know. You can retry a song 100 times trying to SS and still get the same amount of pp as someone who played it twice, hope this helps.