Before the roll only
When you make an ability check, an attack roll, or a saving throw and
have disadvantage on the roll, you can spend 2 ki points to cancel the
disadvantage for that roll. (XGtE)
The fact that it says "when you make" which means it has to be at the time you roll the dice and not after.
Additionally, if a feature allows you use it after rolling, but before (or even after) seeing the results it always says so.
For example, the Bard's Cutting Word ability start with very similar wording, but specifies later in the ability that it can be used later than the default (at the same time the roll is made):
When a creature that you can see within 60 feet of you makes an attack roll, an ability check, or a damage roll, you can use your reaction to expend one of your uses of Bardic Inspiration, rolling a Bardic Inspiration die and subtracting the number rolled from the creature’s roll. You can choose to use this feature after the creature makes its roll, but before the DM determines whether the attack roll or ability check succeeds or fails, or before the creature deals its damage. (PHB)
If an ability does not say that it does something and there is no general rule saying that it should do that thing, then it cannot do that thing.