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,
I have a matrix that I want to filter to show the past calendar month of data. Whilst I have successfully acheived this by adding a relative date slicer, and then hiding it with the selection pane, I was hoping for a different idea that I could put in the visual level filter. Can anyone suggest how to do this as per the attached image and screenshot?
The below dax is a calculated column I tried putting in my calendar table.
The trouble is is brings me the last month of sales data which is Sep 2020. What I WANT is past full calendar month just gone (ie June 2019, as it's July 2019 at present).
Maybe there's a word I can put in place of 'max'? Or is there a different suggestion you have?
Solved! Go to Solution.
Hi @abloor
Before trying a calculated column, I would suggest trying a relative date filter as a visual level filter.
You can apply a filter on your Date column similar to below as a visual level filter:
Does that work for you?
Alternatively, you could create a calculated column like:
LatestMonth = VAR PreviousMonthYear = LOOKUPVALUE ( 'Date'[MonthYear], 'Date'[Date], EOMONTH( TODAY(), -1 ) ) RETURN IF ( 'Date'[MonthYear] = PreviousMonthYear, "Yes", "No" )
Regards,
Owen
Hi @abloor
Before trying a calculated column, I would suggest trying a relative date filter as a visual level filter.
You can apply a filter on your Date column similar to below as a visual level filter:
Does that work for you?
Alternatively, you could create a calculated column like:
LatestMonth = VAR PreviousMonthYear = LOOKUPVALUE ( 'Date'[MonthYear], 'Date'[Date], EOMONTH( TODAY(), -1 ) ) RETURN IF ( 'Date'[MonthYear] = PreviousMonthYear, "Yes", "No" )
Regards,
Owen
Thanks @OwenAuger both of these have worked perfectly.
I will use the first idea since it's the simplest. (But for anyone reading this, the bottom DAX calc column idea was tested and also suits the job.)
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 | |
94 | |
80 | |
68 | |
59 |
User | Count |
---|---|
150 | |
119 | |
104 | |
87 | |
67 |