@Ravi Gupta Welcome to Microsoft Q & A Community Forum. To retrieve the list of virtual machines that are linked to data collection rule, you could use the PowerShell command Get-AzDataCollectionRuleAssociation ( which you are already aware ). However , if you want to retrieve this information using KQL query , its not possible .
One workaround is that Azure Dashboard also visualizes data that is retrieved using Azure REST API. Use Azure Monitor REST API to retrieve the list of vm's associated with specific DCR and visualize it accordingly.