Hi @FriedrichJoachim Greetings! Welcome to Microsoft Q&A forum. Thank you for posting this question here. We are looking into this issue and get back to you with more findings on this. Please stay tuned for updates.
However, at some deployments a wrong targeted and applied count is shown
Can you elaborate a bit on this statement? The value appearing next to Targeted in the System Metrics is determined by the Target Condition defined in the Deployment. You can click View devices under the target condition to see how many devices the deployment targets. Both these values should match. Refer the below image for more details.
Please let us know if you see any issues with this.
The Targeted device and applied device count on symmetric metrics could vary if the deployment failed on any of the targeted devices. You may notice that some of the targeted devices may not have this deployment applied which results in a difference in Applied and Targeted values.
What does this value mean and why is "Current Total" (click on "details") different from that value or in other words, what does "Current Total"
The calculated total is determined by the Target condition of the deployment manifest when created. I believe the Current Total value reflects the count of devices which met the appropriate condition during the deployment is in progress. For example, if the deployment targets 10 devices during the creation, the calculated total remains 10, but the current total for applied metric reflects the current value of the of the deployment status. It is a way of monitoring the deployment status through portal.
I have tested the query you have referred, and I could get the result as expected. Please find the below images for reference.
Fetch the entire module with select * and see if the modules returned with the matching module Id has the deployment status as applied to it. You should see something similar to this in the module returned.
Hope this helps. Please let us know if you notice the correct deployment status in the returned module and yet do not see any result when combining the query.
If the response helped, please do click Accept Answer and Yes. Doing so would help other community members with similar issue identify the solution. I highly appreciate your contribution to the community.