1

This code:

let myvar = Usage| where IsBillable == true| distinct DataType;

throws an error

no tabular expression found

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
tandey
  • 11
  • 2

1 Answers1

0

let is used for Ad-Hoc definitions, in a query's scope.
Your code does not contain a query, only a let statement.

You can use it as following:

let myvar = Usage | where IsBillable | distinct DataType;
myvar

P.S.
IsBillable == true can be shortand to IsBillable

David דודו Markovitz
  • 42,900
  • 6
  • 64
  • 88
  • Thanks David. The above query give the name of the tables where data is getting reported. So i wanna iterate through the myvar array and get resource ID. – tandey Jan 22 '23 at 19:52
  • the out put of above query is a array of strings. Each string is name of a table. – tandey Jan 22 '23 at 19:52
  • "InsightsMetrics AzureMetrics Perf VMProcess VMBoundPort VMComputer VMConnection Event AzureNetworkAnalytics_CL StorageBlobLogs WVDAgentHealthStatus WVDManagement WVDFeeds StorageFileLogs StorageTableLogs WVDConnections WVDCheckpoints WVDErrors WVDConnectionNetworkData WVDHostRegistrations" ================================================= for each in myvar {wvderrors| distinct _ResourceId} – tandey Jan 22 '23 at 19:53
  • Please follow SO guidelines. Your original question was answered,. Accept the answer, delete these comments and use a new post for any other question you still have. – David דודו Markovitz Jan 22 '23 at 19:58