Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Hello, I am trying to create a file that for each date it will return data from a previous day. I would like it to logically verify whether the previous date is a weekend or holiday and ignore those, then return the previous working day. I am attempting to attach my pbix file. Need to find where to do that.
For example, in the below table I would like to return the column [High] and [Low] of the previous working day for the current date. I have been racking my brain trying to figure this out but it seems to be beyond me. Let me know if I can provide more info
Solved! Go to Solution.
@Anonymous Try:
Column High =
VAR __Date = [Date]
VAR __PrevDate = MAXX(FILTER('Table', [Date] < __Date && ( [Day] <> "Saturday" || [Day] <> "Saturday" ) ), [Date])
VAR __Result = MAXX( FILTER( 'Table', [Date] = __PrevDate ), [High])
RETURN
__Result
@Anonymous , You can join date of your table with date of a date table and use time intelligence
example
Day behind Sales = CALCULATE(SUM(Table[Open),dateadd('Date'[Date],-1,Day))
Day behind Sales = CALCULATE(SUM(Table[Open]),previousday('Date'[Date]))
In case you need a column
Sumx(filter(Table, Table[Symbol] = earlier(Table[Symbol]) && Table[Date] = earlier(Table[Date]) -1 ), [Open])
Day Intelligence - Last day, last non continous day
https://medium.com/@amitchandak.1978/power-bi-day-intelligence-questions-time-intelligence-5-5-5c3243d1f9
@amitchandak That doesn't account for holidays and weekends. Need to do a double lookup.
@Anonymous Try:
Column High =
VAR __Date = [Date]
VAR __PrevDate = MAXX(FILTER('Table', [Date] < __Date && ( [Day] <> "Saturday" || [Day] <> "Saturday" ) ), [Date])
VAR __Result = MAXX( FILTER( 'Table', [Date] = __PrevDate ), [High])
RETURN
__Result