Sum if using Case When
How can I write this formula in an effective way? (CASE WHEN `Data`= 'Goal' THEN SUM(`Total`) ELSE 0 END) (CASE WHEN `Data`= 'Pipeline' THEN SUM (`Total`) ELSE 0 END) (CASE When `Data`= 'in P&L' THEN SUM (`Total`) ELSE 0 END) I need to create for every name, but it only works with the first one that I created