Forum Discussion
Data Table showing incorrect data (vs. Power Query & Google Analytics)
Yep! Sorry I should have done that to start.
I was starting to post screen shots when I realized something, and maybe this is the key to figuring this out - when I filter the power query for a specific date, it gives me the right results, which I knew before. But I then saw that if I applied that filter to my dataset, when I go into the data table view, the data is correct. Again, removing the filter at the power query level, and applying, then filtering at the data table level, the data table is incorrect.
Here is my advanced editor script:
----
let
Source = GoogleAnalytics.Accounts(),
#"3XXXX" = Source{[Id="3XXXX"]}[Data],
#"UA-3XXXX-1" = #"3XXXX"{[Id="UA-3XXXX-1"]}[Data],
#"4XXX" = #"UA-3XXXX-1"{[Id="4XXX"]}[Data],
#"Added Items" = Cube.Transform(#"4XXX",
{
{Cube.AddAndExpandDimensionColumn, "ga:adwordsCampaignID", {"ga:adwordsCampaignID"}, {"Google Ads Campaign ID"}},
{Cube.AddAndExpandDimensionColumn, "ga:date", {"ga:date"}, {"Date"}},
{Cube.AddAndExpandDimensionColumn, "ga:campaign", {"ga:campaign"}, {"Google Ads: Campaign"}},
{Cube.AddMeasureColumn, "Revenue", "ga:transactionRevenue"},
{Cube.AddMeasureColumn, "Sessions", "ga:sessions"}
}),
#"Filtered Rows" = Table.SelectRows(#"Added Items", each [Date] > #date(2017, 10, 30)),
#"Filtered Rows1" = Table.SelectRows(#"Filtered Rows", each [Date] = #date(2019, 5, 21)),
#"Sorted Rows" = Table.Sort(#"Filtered Rows1",{{"Revenue", Order.Descending}})
in
#"Sorted Rows"
---
This is obviously with that filter on the power query level
First image is power query, second image is my Google Analytics view, Third image is the Data Table. So GA and Power query correct, Data table incorrect.
v-juanli-msft any thoughts?
- v-juanli-msft7 years agoCommunity Support