The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
We are using Azure tags extensively in our environment. I have some ARG queiries that look for specific tags and check to see if the values are correct. A simiplied version of the query is as follows:
I've spent an hour with Copilot, it had me try many things without success. It finally concluded that the issue is with how ARG query handles the return of no results back to Power Bi. Has anyone run into an issue like this with ARG queires in Power Bi or have any suggestions?
Solved! Go to Solution.
Finally managed to get around this issue, thank you Copilot for getting me two-thirds of the way there. I also needed to add one of my actual subscription IDs as this table was linked to another using that column.
let
Source = AzureResourceGraph.Query("(resources #(lf)| where tags['ApplicationName'] != '3Par' and tags['ApplicationName'] !='Active Directory'and tags['ApplicationName'] != 'Clarity' #(lf)| project id, name, tags['ApplicationName'], tags, subscriptionId,resourceGroup)", null, null, null, [resultTruncated=null]),
DummyRow = [id = "No Results", name = "No Results", tags_ApplicationName = "No Results", tags = "No Results", subscriptionId = "{one of my subscription IDs}", resourceGroup = "No Results"],
Result = if Table.RowCount(Source) = 1 and Table.ColumnNames(Source){0} = "Results" and Source{0}[Results] = "No results" then
#table(Record.FieldNames(DummyRow), {Record.FieldValues(DummyRow)})
else
Source
in
Result
Finally managed to get around this issue, thank you Copilot for getting me two-thirds of the way there. I also needed to add one of my actual subscription IDs as this table was linked to another using that column.
let
Source = AzureResourceGraph.Query("(resources #(lf)| where tags['ApplicationName'] != '3Par' and tags['ApplicationName'] !='Active Directory'and tags['ApplicationName'] != 'Clarity' #(lf)| project id, name, tags['ApplicationName'], tags, subscriptionId,resourceGroup)", null, null, null, [resultTruncated=null]),
DummyRow = [id = "No Results", name = "No Results", tags_ApplicationName = "No Results", tags = "No Results", subscriptionId = "{one of my subscription IDs}", resourceGroup = "No Results"],
Result = if Table.RowCount(Source) = 1 and Table.ColumnNames(Source){0} = "Results" and Source{0}[Results] = "No results" then
#table(Record.FieldNames(DummyRow), {Record.FieldValues(DummyRow)})
else
Source
in
Result