Forum Discussion
Anonymous
9 years agoNot applicable
Reference a previous month using variables in DAX using slicers
Hi I am trying to reference the last week using some dax code that Greg_Deckler provided. I got the last week working but it only works after the firstr week in a given month. How would I ...
vanessafvg
9 years agoCommunity Champion
FILTER ('Table', 'Table'[Date] = DATEADD ( 'Table'[Date], -7, DAY ))you have a comma /bracket in the wrong place
this is how i would do it
CALCULATE(sum(internettarget), filter('Date', 'Date'[Date] = dateadd('Date'[Date], - 7, DAY)))
Anonymous
9 years agoNot applicable
Hi Vanessa,
I am trying to get the full previous week rather than just one day
Thanks for helping though...much appreciated.
Chris
- vanessafvg9 years agoCommunity Champion
Anonymous ag ok make sense, probably need to use week numbers then, perhaps using the function earlier could help? if you had a week number in your date table?
- Anonymous9 years agoNot applicable
Yep got a week number in the date table but it doesnt seem to like using the weeknum function within an evaluation
- vanessafvg9 years agoCommunity Champion
Anonymous show me your code?