Forum Discussion
Ullas Kumble
Microsoft
Jan 22, 2018Log Analytics query with pivot
i am trying to write a pivot query
app("PaymentsAppInsights").customEvents | where name == "PublishToTenantSuccess" | where customDimensions.["TenantName"] == "UST" | project SourceTransactionId = tostring(customDimensions.["SourceTransactionId"]), StatusCode = tostring(customDimensions.["StatusCode"]), SapTimeStamp = todatetime(customDimensions.["SapTimeStamp"]) | where SapTimeStamp > ago(1d) | order by SourceTransactionId, SapTimeStamp asc | evaluate pivot(StatusCode)
and i am getting this error. what am i doing wrong here?
One or more pattern references were not declared. Detected pattern references: Support id: 6a44b86f-91c5-4aba-b163-1598a59cd314
- Benny BauerCopper Contributor
I was able to reproduce it too with my query. It happens to me only when using app().
The following produces the same error:
app('MY_APP').customEvents | where .... .... | evaluate pivot(name, sum(sum_dcount_user_Id))
While, this one works (when running in MY_APP):
customEvents | where .... .... | evaluate pivot(name, sum(sum_dcount_user_Id))