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.
Hi All
I have worked out a measure to sum a column of sales for the same period in a prior year, in my case this is the same quarter last year and a calculation of sales in the prior quarter. This works fine.
But as I have rows of sales in the same period in the prior year, I would like to flag those rows of revenue as opposed to creating a measure to summarise them.
I want to show this flag on my table called "sales", this row was in the same date period of the prior year.
Any ideas? I know I need a calculated column as opposed to a measure. I have a linked date table to work out dates called "DateKey".
Thanks
Hi @imaddrell
You may try to use EARLIER Function in calculated column. If it is not your case, please share some data sample and expected output. For example:
PeriodLastYear = CALCULATE ( SUM ( Sales[Sales] ), FILTER ( Sales, YEAR ( Sales[Date] ) = YEAR ( EARLIER ( Sales[Date] ) ) - 1 && MONTH ( Sales[Date] ) = MONTH ( EARLIER ( Sales[Date] ) ) && DAY ( Sales[Date] ) = DAY ( EARLIER ( Sales[Date] ) ) ) )
Regards,
Cherie
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 |
---|---|
110 | |
99 | |
80 | |
64 | |
58 |
User | Count |
---|---|
148 | |
111 | |
93 | |
84 | |
66 |