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 Guys,
I wan't a measure or column that shows me the last 24 months, from last month. So that will be March 2017 - March 2019.
The data set is simple
Sales data table,
Sales Number,
Value,
Date
Calendar
Year,
Month,
MonthYear
Feel free to add any fields in the Calendar to do the last 24 months, starting from previous month.
And the financial year starts in June.
Thanks
Lak
Solved! Go to Solution.
Thanks for this @kinder
Please use this formula;
Hi @kinder
You can create a calculated column in the calendar table to indicate whether the date is in your specified time period.
An if statement to check whether the date is greater than or equal to last month minus 2 years and less or equal to last month.
Then apply a report level filter to only include rows where the new column = True
Hope this helps
Thanks,
George
Thanks, but what is the syntax of that if statement.
@kinder Please could you share an extract of your Calendar table so i can see the format of each column?
Thanks,
George
You can create one from scratch to make it easier.
Or
Date =
ADDCOLUMNS (
CALENDAR (DATE(2018,1,1), DATE(2022,31,12)),
"DateAsInteger", FORMAT ( [Date],"YYYYDDMM" ),
"Year", YEAR ( [Date] ),
"Monthnumber", FORMAT ( [Date], "MM" ),
"YearMonthnumber", FORMAT ( [Date], "YYYY/MM" ),
"YearMonthShort", FORMAT ( [Date], "YYYY/mmm" ),
"MonthNameShort", FORMAT ( [Date], "mmm" ),
"MonthNameLong", FORMAT ( [Date], "mmmm" ),
"DayOfWeekNumber", WEEKDAY ( [Date] ),
"DayOfWeek", FORMAT ( [Date], "dddd" ),
"DayOfWeekShort", FORMAT ( [Date], "ddd" ),
"Quarter", "Q" & FORMAT ( [Date], "Q" ),
"YearQuarter", FORMAT ( [Date], "YYYY" ) & "/Q" & FORMAT ( [Date], "Q" )
)
Thanks for this @kinder
Please use this formula;
That worked a treat. Thanks
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 |
---|---|
112 | |
100 | |
80 | |
64 | |
57 |
User | Count |
---|---|
146 | |
110 | |
93 | |
84 | |
67 |