Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
How can i get the sale for the day one week back,month back and year back for a particular column?
Not sum till date, just the sale on that particular day, week back,one month back and year back.
For eg, if today is 28/07/2022, i want my sale on 21/06/2022,28/06/2022 and 27/07/2021.
Thanks In Advance.
Data set view and expected results images attached.
Many Thanks.
Solved! Go to Solution.
You can use DATEADD, e.g.
Prev Month = CALCULATE( [Base measure], DATEADD('Date'[Date], -1, MONTH)
Prev Year = CALCULATE( [Base measure], DATEADD('Date'[Date], -1, YEAR)
Prev Week = CALCULATE( [Base measure], DATEADD('Date'[Date], -7, DAY )
You can use DATEADD, e.g.
Prev Month = CALCULATE( [Base measure], DATEADD('Date'[Date], -1, MONTH)
Prev Year = CALCULATE( [Base measure], DATEADD('Date'[Date], -1, YEAR)
Prev Week = CALCULATE( [Base measure], DATEADD('Date'[Date], -7, DAY )
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
113 | |
104 | |
77 | |
67 | |
63 |
User | Count |
---|---|
144 | |
107 | |
105 | |
82 | |
69 |