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.
I am trying to create a report that will just display the records of the last twelve months. There is an option that allows a relative filter on a field. The filter will allow you to show "the last 12 months" of records based on my transaction date. So if I look at the report on the 15th of the month, "the last 12 months is in accurate". An example:
When your computer date is in August 15, 2019, it will pick up records from August 15, 2018 to August 15, 2019. We need to look at this from August 1, 2018 to August 31, 2019. I was hoping that we could do the filter relative to a measure instead of the computer time. We could then say, filter transaction date based on it being >= measure 1 and <= measure 2. Where measure 1= August 1, 2018 and measure 2 is August 31, 2019. Does anyone have a solution to this?
Refer Dates. date dim is marked as date in power bi
Change Date End = Var _endDate= Maxx(ALLSELECTED('Date'[Date Filer]),ENDOFMONTH('Date'[Date Filer])) Var _start_date= minx(ALLSELECTED('Date'[Date Filer]),DATEADD(STARTOFMONTH('Date'[Date Filer]),-12,MONTH)) return _endDate & " " & _start_date
Sales
Change Date End Sales = Var _endDate= Maxx(ALLSELECTED('Date'[Date Filer]),ENDOFMONTH('Date'[Date Filer])) Var _start_date= minx(ALLSELECTED('Date'[Date Filer]),DATEADD(STARTOFMONTH('Date'[Date Filer]),-12,MONTH)) return calculate(sum(Sales[Sales Amount]),Sales[Sales Date] >= _start_date && Sales[Sales Date] <= _endDate)
Hi,
See if my solution here helps - Flex a Pivot Table to show data for x months ended a certain user defined month.
Hope this helps.
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 |
---|---|
111 | |
95 | |
80 | |
68 | |
59 |
User | Count |
---|---|
150 | |
119 | |
104 | |
87 | |
67 |