In principle you always have a rental revenue for 12 months per year, regardless of whether it is occupied or not, even if abroad.
You can reduce this revenue by doing maintenance or repairs, down to zero; whether you can go beyond this depends on the canton, often they allow instead certain expenses to be carried to the following year. It can also happen if you are self-employed in the other canton and didn't do well. You cannot offset property losses abroad with swiss revenues. Even with zero revenue, you still have to pay something for wealth tax, so the tax will never really become zero.
The cantons will carry out each year an intercantonal/internation repartition of all your deductions or negative tax return elements, so that the deductions are apportioned to the same ratio as the positive revenues. So if, eg you have 80% of your revenues in one canton and 20% in another or abroad, then most deductions (not the employment-related ones such as travel to work, but all others, regardless if they have nothing to do with the other canton or abroad) will also be re-adjusted as 80%-20%, so are effectively losing out part of the deduction that you would normally get in your home canton if you had nothing elsewhere.
This makes sense as otherwise someone could incur additional debt (which is tax deductible) to invest in a property abroad, resulting in additional
rental income which would not otherwise be taxable, making a perverse tax-exempt benefit.
To make calculations worse, two cantons can have and use different rules what counts as a valid property deduction and the amounts are (although most agree, eg., that one-off payments eg to notaries are not deductible) for repartition purposes, so the calculation can differ depending which canton is doing it.
For the wealth tax there is a separate repartition of positive/negative elements, but there the differences between how each canton evaluates the price of a property are so big, that cantonal adjustment coefficients are used (eg 100% for SG, 145% GE, 385% BL) to fairly repartition your wealth among cantons for wealth tax purposes.
For the federal income tax, it is your canton of residence who does the calculation, even for properties in a different canton, as well as a separate international repartition for federal tax, if you have properties abroad.