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.
How can I set a date filter that will include the previous 3 days?
Example: I need to run a report Monday through Friday, each day the report will contain items added on the previous calendar day, but on Monday I need to run the report to include Friday - Sunday. I have written 1 query for Tuesday through Friday to pull 1 previous day, but I can not figure out how to set the filter for Monday's reports so it will always include the three previous days.
@Anonymous Sounds like you need a Complex Selector or perhaps something like:
Measure =
VAR __MaxDate = MAX('Dates'[Date])
VAR __MinDate = __MaxDate - 3
VAR __Table = FILTER( ALL('Table'), [Date] >= __MinDate && [Date] <= __MaxDate )
VAR __Result = SUMX( __Table, [Value] )
RETURN
__Result
The Complex Selector - Microsoft Fabric Community
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
10 | |
7 | |
6 | |
6 | |
6 |