Forum Discussion
Set date range limit on google analytics query
- 11 years ago
When you bring the Time attribute in your query, you have the ability to right click on the time field and specify the filter condition (Before, After, etc.) after the filter has been applied you can click on a gear box next to the Filtered Rows step in the Applied Steps section on the right and tweak it if you need to.
Thanks Andre, super helpful of you!. Can I ask a couple of follow up questions for clarity.
The only place I could find what you suggested was in the edit queries section, where I went to to the column for date, clicked on the drown arrow in the 'date' column header, and filtered that way using the filter fucntion.
Was that what you mean't?
If so, does this filter the data post query, in which case my query to Google analytics still a large 'all time' one? If yes, can I chnage the actually query to Google Analytics, to speed up the query itself.
The latter is probably the larger issue for me, as the query can run for half an hour at a time.
If you edit your query, add something from the Time category and filter on that, then my understanding is that this will only bring down the unfiltered information from the service into the model, just like how it works with all other data sources. If you filter as part of the query, then only the unfiltered data comes into the model.
This is different if you didn't filter in the query itself but rather built a report after the fact and did your filtering there. In this case, your data model would have all of the data.
- SHDJason10 years agoAdvocate II
This is only partially true. In the case of a large dataset, Power BI will query the full dataset, then only load the records that match the filter definition. However, this does not really solve the problem because GA will return sampled data if the request is too large. Unfortunately, there does not seem to be a way to stop P BI from making a full dataset request becaue there is no way to set the GA start and end date parameters. Consequently, the data that is downloaded could be the result of a very high sampling rate even if you are only interested in a small slice of data.
The Power BI team should really make it possible to set the additional GA parameters like start date, end date, segment ID. They are pretty important when working with the Google Analytics api.