I have a sales table that shows sales by month, but also populates expected sales in the same column for previous months. To filter out previous months I have used the following expressions:
Go to Solution.
if it's always full month until new data is released then you could use EOMONTH, like that:
DateswithSales = IF('Date'[Date] <= EOMONTH(TODAY(), -1), TRUE , FALSE)
it will return 31st July during all days of August, and start returning 31st August as of 1st September
Proud to be a Datanaut!
First of all, please stop writing things like
DateswithSales = IF('Date'[Date]<=TODAY(),true,false)
when this will do
DateswithSales = 'Date'[Date] <= TODAY()
The expression returns a logical value you're after so what's the use of IF?
Secondly, in the same vein, not
'Date'[DateswithSales] -- this is already a logical expression
And thirdly, @Stachu has probably given you the correct measure but please remove the unnecessary clutter from it as shown above.
Thank you for the great advice!
this worked, thanks!!
Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.
We spoke with Power BI Super User, Greg Deckler, about his charity work
Continue your learning in our online communities.