Alternatively, if it's also possible to show numbers with the thousand separator but just show however many decimals the number has, that would work, too. For instance, if the number is rounded to zero, show 1,000. If the number is rounded to two, show 1,000.02. But to not have to change this setting in the number format of the measure, so it's dynamic.