Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi,
I currently have a huge dataset of google analytics data that I am using as a data source in power BI. Currently, I am filtering the date manually which gives this query:
= Table.SelectRows(#"Added Items", each [Date] >= #date(2021, 11, 22))
What I want to do is allow the user to choose the date that the data starts, which then loads the data from the correct range. However, I don't want the report to load the entire dataset as the dataset has >20,000 rows.
I am trying to approach this problem by using power BI parameters with a default value that isn't too long ago, and use a list of suggested values from a query that lists dates in specific intervals, e.g., 10, 20, and 30 days ago from the current date, etc. I would then filter the date column in the dataset to be on or after the specified parameter value, but I'm not sure how to go about this as I am pretty new to Power BI.
Any help is greatly appreciated.
@Anonymous You're absolutely on the right track. Have you created the parameter already? Have you generated the query with the list of values? Which step do you need help on?
Copying DAX from this post? Click here for a hack to quickly replace it with your own table names
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C
I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com
I'm glad to hear that I'm on the right track. I've created the parameter with a single value as a placeholder, which does work to filter the data. However, I don't know how to create this query which lists multiple dates from N days before the current date.
@Anonymous This function Date.AddDays might help: https://docs.microsoft.com/en-us/powerquery-m/date-adddays
If you can provide sample files I can give more specific help... (sorry for the long delay, took a bit of time off 🙂 )
Copying DAX from this post? Click here for a hack to quickly replace it with your own table names
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C
I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com
User | Count |
---|---|
77 | |
76 | |
44 | |
30 | |
26 |
User | Count |
---|---|
97 | |
91 | |
52 | |
47 | |
46 |