Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowData Days is here! Join us now for 60+ days of learning, challenges, and connection. Learn more
When I select Aug 17 in the filter than data of only Jun-17, July-17 and Aug-17 should be shown in the slicer graph
Solved! Go to Solution.
Hi @SuryaK ,
According to your description, you want to select a certain value in a slicer and then return the value of the day of the previous 3 months in the slicer. For this requirement, which we cannot achieve in one slicer, we need to use two tables and create two slicers.
Here is my test data: "Table"
Table = CALENDAR(DATE( 2022,1,1) ,DATE(2022,3,1))
Then we need to create a second date table based on the date column of this Table, and make sure that the date column of this new date table needs to contain the first three months of the table's dates.
Table 2 = var _max_date = MAX('Table'[Date])
var _min_date = MIN('Table'[Date])
var _first_date = EDATE(_min_date , -2)
return
CALENDAR(_first_date , _max_date)
Then, we create a measure.
Measure = var _slice = SELECTEDVALUE( 'Table'[Date])
var _t = {EDATE(_slice,-1),EDATE(_slice,-2),_slice}
return
IF(SELECTEDVALUE('Table 2'[Date]) in _t ,1,0)
Then we put 'Table'[Date] in slicer 1, then 'Table2'[Date] in slicer 2, and then we put our metric in slicer 2's " Filter on this visual" and then configure it as follows:
If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. Thank you.
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @SuryaK ,
According to your description, you want to select a certain value in a slicer and then return the value of the day of the previous 3 months in the slicer. For this requirement, which we cannot achieve in one slicer, we need to use two tables and create two slicers.
Here is my test data: "Table"
Table = CALENDAR(DATE( 2022,1,1) ,DATE(2022,3,1))
Then we need to create a second date table based on the date column of this Table, and make sure that the date column of this new date table needs to contain the first three months of the table's dates.
Table 2 = var _max_date = MAX('Table'[Date])
var _min_date = MIN('Table'[Date])
var _first_date = EDATE(_min_date , -2)
return
CALENDAR(_first_date , _max_date)
Then, we create a measure.
Measure = var _slice = SELECTEDVALUE( 'Table'[Date])
var _t = {EDATE(_slice,-1),EDATE(_slice,-2),_slice}
return
IF(SELECTEDVALUE('Table 2'[Date]) in _t ,1,0)
Then we put 'Table'[Date] in slicer 1, then 'Table2'[Date] in slicer 2, and then we put our metric in slicer 2's " Filter on this visual" and then configure it as follows:
If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. Thank you.
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thanks @ v-tangjie-msft
Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.
Check out the May 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 23 | |
| 23 | |
| 21 | |
| 17 | |
| 14 |
| User | Count |
|---|---|
| 58 | |
| 50 | |
| 37 | |
| 29 | |
| 24 |