Forum Discussion
Date: weekends and holidays
You can set up a visual-, page-, or report-level filter and choose a starting date and ending date in there based on your date field in your date dimension.
How the solutions is changing if we need calculate the number of days between today and x amount of days back. The page will not have an date filter / slicer on it, but instead I want to create a pre-selected slicer with number of days to select from, for example 2, 7 days or 14, 30 days, from current date? i need a measure that will take into consideration any weekends or holidays and when a user clicks on the day range on the slicer the tables / charts in the page to update for the last 2, 7, 14, or 30 working days instead of actual calendar days. if today is a Monday and I click 2 days on the slicer day range selection and I have applied a report level filter for only the trading days, then it does not bring back anything. as it the way the day range harvested measure works is to go back 2 days from today() day and it cannot take into consideration the fact that it is a weekend/holiday
Days Range val = if(HASONEVALUE('Days Range Selection'[Day Range]); VALUES('Days Range Selection'[Days]);COUNTROWS(ALL('Calendar')))
Daily Deposit = CALCULATE([Deposit Balance];
FILTER('Calendar';
'Calendar'[Date]>TODAY()-'Days Range Selection'[Days Range val] && 'Calendar'[Date]<=TODAY())