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 need help on filter last 7 days and 60 days. Suppose I have Table1[dateExam]. How could I have the return of the last 60 days, using the date range slicer ? For example, for this one, I want that if I select 06/30/2021, I would have the return of all the day beetween 04/30/2021 and 06/30/2021. If I select in the slicer range 01/05/2023, I would have for the return of the last 60 days, all the day beetween 11/05/2022 and 01/05/2023. When I try fron Today(), it seems to wotrk, but I want for all range date also. So I want that for a date I select like 01/05/2023 in Segment, it return me the last 7 days and the last 60 days.
Thanks!
Hi @game1 ,
As far as I know, the between slicer can't do that for now, the between slicer can only set the date range filter in Filter to change the above
Create a relative date slicer or filter in Power BI - Power BI | Microsoft Learn
You can use the Vertical list slicer.
Here are the steps you can follow:
1. Create calculated table.
Table 2 =
DISTINCT('Table'[Date])
2. Create measure.
Flag =
var _maxdate=SELECTEDVALUE('Table 2'[Date])
var _mindate=EOMONTH(_maxdate,-2)
return
IF(
MAX('Table'[Date]) >= _mindate && MAX('Table'[Date])<=_maxdate,1,0)
3. Place [Flag]in Filters, set is=1, apply filter.
4. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hello,
It not working wery well.
I have Table1[dateExam] and Table1[numberPeople].
First, I need to use a CALENDAR (range slicer) to select a date (it must only consider the max date of range slicer selected). For example, I can select 10/01/2021 as my maximum date.
Second, I need to check one of the options: (in Segment). For example, I can check the option “last 7 days”.
Then, it would return me the numberPeople for the “last 7 days” of the selected date in the CALENDAR.(So the “last 7 days” is base on the CALENDAR (range slicer) I have selected.)
In other words, it would return me in a graphic, the numberPeople between 03/01/2021 and 10/01/2021.
For this example, in a graphic, I would have for each day between 03/01/2021 and 10/01/2021, the numberPeople that have done dateExam from Table1[dateExam].
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 |
---|---|
44 | |
26 | |
22 | |
12 | |
8 |
User | Count |
---|---|
75 | |
51 | |
47 | |
16 | |
13 |