Forum Discussion
CahabaData
Memorable Member
9 years agofilter by actual date
Table A PERIOD Country Purchases 1/1/2016 France 150 1/1/2016 Italy 100 1/1/2016 Belgium 250 1/1/2017 France 55 below are a series of Measures - where I've just altered t...
- 9 years ago
1) since you're using CALCULATE, you don't need the explicit FILTER
2) If you don't convert the literal string 1/1/2016 to a date by use of DATE() (e.g. DATE(2016,1,1)) then PowerBI interprets it as "1 divided by 1 divided by 2016", giving a number value that converts to Dec 30, 1899 (I believe - somewhere around there). Try
ActiveByDate = calculate( countrows('Table A'), 'Table A'[Period] > date(2016, 1, 1) //or = or <, etc )Hope this helps.
David
Phil_Seamark
Microsoft Employee
9 years agoHI CahabaData,
So what are you trying to achieve? Are you just trying to find the date of the most recent purchase for each Country?