Forum Discussion
Help with Calculated Column
- 4 years ago
Hi rsbin
No need to use EARLIER, this is easier ....
Sunday prior =
-- get this weekdate
VAR myweekdate = SELECTEDVALUE(payroll [weekdate])
-- gets the previous week
VAR prevweekdate = DATEADD(myweekdate ,-7,day)
RETURN
-- gets prior sunday by removing the week filter and then getting the previous week
CALCULATE(payroll(Sunday),
ALL(payroll, payroll[weekdate]),
payroll[weekdate] = prevweekdate)I am a Power BI volunteer. Please click the thumbs up for me going to the effort of trying to helping you. Then click solved if I fix your problem. One problem per ticket please. If you need to expand or change your problem then please raise a new ticket and click solved on this one so we get kudos. Many thanks.
Thanks for the response and for the suggestion to use Variables.
Will give this solution a try and will let you know how I make out.
Thanks again and Best Regards,
I am a Power BI volunteer. Please click the thumbs up now for me going to the effort of trying to helping you. Then click solved soon if I fix your problem so we get kudos. Many thanks.