Forum Discussion
ai52487963
9 years agoNew Member
Google Analytics query URI in power bi?
I'm querying google analytics from power bi for use with dashboarding and all that. I'm trying to look at page views for a specific page, but power bi likes to bring in all the data first THEN filter...
- Anonymous9 years ago
ai52487963,
When connecting to GA data in Power BI Desktop, bring the date attribute into the query as shown in the following screenshots.
Then you can add the following code in the Advanced of your query to filter date between last 30 days and yesterday.#"Filtered Rows" = Table.SelectRows(#"Added Items", each [Date] >= Date.AddDays(DateTime.Date(DateTime.LocalNow()),-30) and [Date] <= Date.AddDays(DateTime.Date(DateTime.LocalNow()),-1)) in #"Filtered Rows"
Regards,
Lydia
Anonymous
9 years agoNot applicable
ai52487963,
When connecting to GA data in Power BI Desktop, bring the date attribute into the query as shown in the following screenshots.
Then you can add the following code in the Advanced of your query to filter date between last 30 days and yesterday.
#"Filtered Rows" = Table.SelectRows(#"Added Items", each [Date] >= Date.AddDays(DateTime.Date(DateTime.LocalNow()),-30) and [Date] <= Date.AddDays(DateTime.Date(DateTime.LocalNow()),-1)) in #"Filtered Rows"
Regards,
Lydia