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.
Hello to you,
my issue is pretty simple to explain but I haven't found anything to solve it.
I have a normal date filter with "between" mode:
I need to model it so that when I open the report start and end date are not the minimum and the maximum ones but they should be set to show data from last completed month. For example:
Then if I want to change the date range of course I can, but when I open it I should find it set showing last completed month. I can do it with a bookmark, but I want to know if there is a way to do it directly without creating any bookmark.
Is there a way?
Thank you so much.
Nick
@Anonymous
You can try relative date slicer
https://docs.microsoft.com/en-us/power-bi/visuals/desktop-slicer-filter-date-range
Thank you @amitchandak for your hint.
Well it would be nice, but I'd need to keep the filter in between mode and opening it with last month already selected dynamically. You suggestion is good but I want to have this kind of slicer and possibly add some code/column/measure/whatelse to achieve it.
So generally you would create a calculated column to flag last month dates and then use that as a filter in your slicer.
Thank you @Greg_Deckler for answering.
I already tried but if I use this filed as a visual filter it doesn't work. I see it works if I use a date column on my data table but I am using data coming from Calendar function (my field is Date = CALENDAR(MIN(My_Date); MAX(My_Date)) ) and it looks not influenced by the filter you are suggesting.
So is that Date a table in the model?
@Greg_Deckler yes, it comes from a table built with Calendar fuction right to create this date field
@Anonymous
You may refer to the post below.
Thanks @v-chuncz-msft this is pretty simple but good. I already thought to it, I'd like to know if there is a way to do it without adding any visual but simply open the report with dates already set on last month.
So can't you add your flag column to that table?
@Greg_Deckler if you mean adding the flag column to the visual level filter, yes I can but it has no effects and dates still remain to normal range without being influenced by it. I see it doesn't happen if I don't use Calendar date but a date field from my data, but I need Calendar because I need every single day and not just days for which there is a record.
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 | |
97 | |
85 | |
70 | |
61 |
User | Count |
---|---|
151 | |
121 | |
104 | |
87 | |
67 |