Forum Discussion
azaterol
Helper V
4 years agoSales previous years
Hey all,
I have a measure which calculate the sales from 2020/01/01 until 2020/8/3.
Sale 2020 until 03.08. =
Calculate(Customers[Sale]-0,DATESBETWEEN('Date'[Date],DATE(2020,1,1),DATE(2020,8,3)))But this isin`t like what I want to have, because I have to update it manually every day! 😞
I want a measure for each previous year(2020,2021) which calculate from 01.01. until todays Day-Date. Like today is the 3rd of august, it should automatically calculate the previous year 2020 from 2020/01/01 until 2020/08/03.
The same measure for 2020 I can use for 2021 and 2022 also.
Here is the sample, for better understand.
Try this measure:
Sale 2020 until 03.08. = CALCULATE ( Customers[Sale] - 0, DATESBETWEEN ( 'Date'[Date], DATE ( 2020, 1, 1 ), DATE ( 2020, MONTH ( TODAY () ), DAY ( TODAY () ) ) ) )
2 Replies
- DataInsights
Super User
Try this measure:
Sale 2020 until 03.08. = CALCULATE ( Customers[Sale] - 0, DATESBETWEEN ( 'Date'[Date], DATE ( 2020, 1, 1 ), DATE ( 2020, MONTH ( TODAY () ), DAY ( TODAY () ) ) ) )- azaterol
Helper V
DataInsights works perfect! Thank you!