The diamagnetic flux is the small difference in toroidal flux with plasma and without plasma. This measurement contains valuable information about the fast-ion confinement since energetic particles can significantly contribute to the plasma pressure and modify the diamagnetic flux. The diamagnetic flux diagnostic at ASDEX Upgrade [1] can therefore be used to investigate fast-ion transport in advanced scenario and resonant magnetic perturbation (RMPs) discharges