subquery not working

subquery not working

Hi!

I'm trying to make a subquery and the system will not let me, I've tried several ways with no result, Annex consultation to see if I can help 

SELECT DISTINCT "A"."Semanas",
  (SELECT SUM(CASE 
WHEN "Código"='SI'  THEN "Saldo inicial del banco"
ELSE 0
END ) FROM "Juan sql" WHERE  "Semana anterior"= "A"."Semana anterior") AS "Saldo inicial del banco",
"A"."Semana anterior"
FROM "Juan sql" as 'A'
GROUP BY "A"."Semanas","A"."Semana anterior"

tells me that does not identify the alias
thanks....