本文介绍了Application Insights在PowerBI中未返回正确的数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好

我正在使用 连接到Application Insights PowerBI,但我无法获取最近90天的数据.

我正在获取从2018年10月26日到今天的日期的数据,但是应该是从2018年9月8日到今天的日期.

I am connecting with Application Insights using  PowerBI, but I am not able to get the last 90 days data.

I am getting data from 26-OCT-2018 to Today's date but it should be from 08-Sep-2018 to Today's date.

我正在使用以下查询来获取数据.

I am using the below query for fetching the data.

我得到的行计数是90天,但不知道timestamp列将不存在90天.

有人可以帮我解决这个问题,谢谢.

The row count that I am getting is for 90 days but somehow the timestamp column is not coming for 90 days.

Can someone please help me in resolving this issue, Thanks in advance.

查询:

谢谢,
Rajendra

Thanks,
Rajendra

推荐答案

您能否帮助确认您是否在应用程序洞察分析窗口中看到9月8日至今的数据?通过转到Application Insights实例-> 分析页面并在自定义时间范围内运行pageViews查询.

Could you please help confirm if you are seeing the data from Sep 8th to till date in application insights analytics window ? By going to Application Insights instance -->  analytics page and running the pageViews query with custom time range.

我们已经尝试使用以下查询在现有的应用程序洞察实例中之一,使其能够在Application Insights查询窗口以及带有时间戳的PowerBI中获得结果.  

We have tried in one of our existing application insights instance with below query was able to get the result back both in Application Insights query window and also in PowerBI with timestamp.  

 

让AnalyticsQuery =

let AnalyticsQuery =

let Source = Json.Document(Web.Contents("https://api.loganalytics.io/v1/apps/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/query",

let Source = Json.Document(Web.Contents("https://api.loganalytics.io/v1/apps/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/query",

[Query = [#``query''=''pageViews'',#``x-ms-app''=``AAPBI'',#``timespan''=``2018-09-09T12:05:30.000Z/2018 -12-11T20:05:30.586Z,#" prefer"=" ai.response-thinning = true],Timeout =#duration(0,0,4,0)])),

[Query=[#"query"="pageViews",#"x-ms-app"="AAPBI",#"timespan"="2018-09-09T12:05:30.000Z/2018-12-11T20:05:30.586Z",#"prefer"="ai.response-thinning=true"],Timeout=#duration(0,0,4,0)])),

TypeMap = #table(

TypeMap = #table(

{"AnalyticsTypes","Type" }

{ "AnalyticsTypes", "Type" },

{

{"string",   Text.Type},

{ "string",   Text.Type },

{"int",     Int32.Type},

{ "int",      Int32.Type },

{"long",    Int64.Type},

{ "long",     Int64.Type },

{"real",    Double.Type},

{ "real",     Double.Type },

{"timespan",Duration.Type},

{ "timespan", Duration.Type },

{"datetime",DateTimeZone.Type},

{ "datetime", DateTimeZone.Type },

{"bool",    Logical.Type},

{ "bool",     Logical.Type },

{"guid",    Text.Type},

{ "guid",     Text.Type },

{动态", Text.Type}

{ "dynamic",  Text.Type }

})

DataTable =源[表格] {0},

DataTable = Source[tables]{0},

列= Table.FromRecords(DataTable [columns]),

Columns = Table.FromRecords(DataTable[columns]),

ColumnsWithType = Table.Join(Columns,{"type"},TypeMap,{"AnalyticsTypes"}),

ColumnsWithType = Table.Join(Columns, {"type"}, TypeMap , {"AnalyticsTypes"}),

行= Table.FromRows(DataTable [rows],Columns [name]),

Rows = Table.FromRows(DataTable[rows], Columns[name]),

Table = Table.TransformColumnTypes(Rows,Table.ToList(ColumnsWithType,(c)=> {c {0},c {3}}))

Table = Table.TransformColumnTypes(Rows, Table.ToList(ColumnsWithType, (c) => { c{0}, c{3}}))

表格

在AnalyticsQuery中

in AnalyticsQuery

"Application Insights查询"页面的屏幕截图(我们仅从9月27日开始提取数据,原因是您会看到那时的数据)


PowerBI查询结果中的屏幕截图




这篇关于Application Insights在PowerBI中未返回正确的数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

11-01 22:45