Hello:
I was able to get some help on this question a couple-few weeks ago. I have a need to show Start of Week showing as a Monday (in a card visual). If Monday is a holiday, then Tuesday would appear.
I have set the date slicer as relative (This Day) and have a measure that works. I also want to calculate the previous weeks start date(with the same criteria). These are the two measures that work fine on Desktop but go blank on service.
Report Start Date** =
var _selectedYear = SELECTEDVALUE(Dates1[year])
var _selectedWeek = SELECTEDVALUE(Dates1[Week No.])
var _startOfTheWeek =
CALCULATE(
FIRSTDATE(Dates1[Date]),
FILTER(ALL(Dates1),
Dates1[Week No.] = _selectedWeek && Dates1[year] = _selectedYear && Dates1[Flag] = “WeekStart”)
)
return
_startOfTheWeek
**PW Report Start Date =
var _selectedYear = SELECTEDVALUE(Dates1[year])
var _selectedWeek = SELECTEDVALUE(Dates1[Week No.])-1
var _startOfTheWeek =
CALCULATE(
FIRSTDATE(Dates1[Date]),
FILTER(ALL(Dates1),
Dates1[Week No.] = _selectedWeek && Dates1[year] = _selectedYear && Dates1[Flag] = “WeekStart”)
)
return
_startOfTheWeek
Should this be done instead in PQ or is there a trick with my date slicer to make the dates persist on Service?
Thank you very much!
File Attached.
Start of Week Monday or Tuesday(if holiday)
*** READ FIRST ***
Before you send your question.
Make sure that all details relevant to your question is complete:
- Your current work-in-progress PBIX file - VERY IMPORTANT
- A clear explanation of the problem you are experiencing
- A mockup of the results you want to achieve
- Your underlying data file
Check out this thread on Tools and Techniques for Providing PBIX Files with Your Forum Questions
Also make sure that your data file contains no confidential information. If it does, click the link above.
*** DELETE THIS MESSAGE IF YOU ARE SURE ALL YOUR DETAILS ARE COMPLETE OR IF THE ABOVE INFORMATION IS NOT APPLICABLE TO YOUR QUESTION.***