Formula looks something like this:
(Basic pay + Perdiem) - (NI + Perdiem according to swedish list) = Amount they will use to calculate your tax - tax in Portugal (20% of basic pay)... Then you can take off normal stuff like loans, travel to gateway etc... Perdiem according to swedish list is depending on what country you fly to, but it will be a bit more than 70E/day. Hope it helps!