The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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