Thank you for sending the files.
The only difference between the two scenarios is that one has a load, and the other does not have a load.
SAM calculates the NPV based on the annual electricity bill savings, which represent the value of the renewable energy system. The bill savings is calculated as the annual "bill with system" minus the "bill without system."
In the scenario with no load, the annual bill without system is the sum of the fixed monthly charges (12 months * 89.72 $/month = $476.64). The bill with system is the sum of the fixed charges, energy charges, and demand charges, and comes to $-23,414. Note that the demand charge applies to the 0.0606 kW consumed by the inverter at night. It is a negative value because SAM assumes the electricity customer receives a payment at the hourly sell rates for the electricity generated by the system. Therefore, the bill savings is $477 - $-23,414 = $-23,891.
In the scenario with a load, the annual bill without system is now the sum of fixed, energy, and demand charges and is $826,028. The bill with system is now positive at $802,136 because the system output is small compared to the load (7.6 million kWh annual load compared to 0.62 million kWh power generation). The net savings are $826,028 - $802,136 = $23,892.
Because you chose the "all generation sold at sell rate(s) and all load purchased at buy rate(s)", the difference between the "with system" and "without system" bill is the same in the no load and with load scenario: In both cases, all of the power generated by the system is sold at the sell rates. In the no load scenario, the value of the system is value of the total electricity sold. In the with load scenario, the value of the system is the difference between the with system and without system electricity bill. But, with the addition of a load, both of those values increased by the same amount because the electricity purchases are not affected by the system, so the net value of the system stays the same.
That is a little tricky to explain, but I hope it makes sense.
Also, I noticed that the capacity factor and energy yield for your system seems low, which I think may be due to the data in your weather file. I compared it to results from the hourly weather file for Madrid in SAM's default weather file for reference.
Best regards,
Paul.