- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

how to capture the value entered for relative Date slicer selection
Hi, I have a relative date slicer how to capture the entered value?
i have a measure i passed static value of 4 , instead of this i need to pass the relative slicer entered value
this is my measure
Measure =
SWITCH(
TRUE(),
SELECTEDVALUE(Table1[CreatedDate]) = BLANK(), 1,
SELECTEDVALUE(Table2[Schedule date]) <= SELECTEDVALUE(Table1[CreatedDate]) &&
SELECTEDVALUE(Table2[Schedule date]) >= SELECTEDVALUE(Table1[CreatedDate]) - 4, 1,
0
)
in this measure used for top table row filter based bottom table value filtering so i need to change dynamically pass slicer entered value
Reference
i have attached sample data
Thanks
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Hey @itsranga,
That could possibly be a difference between today's date and min date in filter context. You can check the following approach:
relativeDays =
VAR _minDate = MIN(calTab[Date])
VAR _diff = TODAY() - _minDate
RETURN INT(_diff)+1
Hope it helps!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

I have attached pbix file for your reference, i have 2 table top table if i select any row created date based bottom table filter schduled date to below 4 tables ,
instead of Staic value of 4 days i need dynamically filter selected row - slicer enterd date this one im using measure
relativeDays = VAR _minDate = MIN(calTab[Date]) VAR _diff = TODAY() - _minDate RETURN INT(_diff)+1
this is working im getting slicer enterd date but if i pass the value to measure means its not working
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

@itsranga, I believe it works fine, there are likely some other issues in your report/data model, i.e. why would you have the interaction between visuals disabled?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

you have defined what your expected result is? this would be needed to test the solution.
If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!
Proud to be a Super User!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

I have attached pbix file for your reference, i have 2 table top table if i select any row created date based bottom table filter schduled date to below 4 tables ,
instead of Staic value of 4 days i need dynamically filter selected row - slicer enterd date this one im using measure
relativeDays = VAR _minDate = MIN(calTab[Date]) VAR _diff = TODAY() - _minDate RETURN INT(_diff)+1
this is working im getting slicer enterd date but if i pass the value to measure means its not working
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Hey @itsranga,
Have you tried to add the measure that I suggested as a first step and then using it in your main measure? Doesn't that work as expected?
This is how it should look like:
Measure =
SWITCH(
TRUE(),
SELECTEDVALUE(Table1[CreatedDate]) = BLANK(), 1,
SELECTEDVALUE(Table2[Schedule date]) <= SELECTEDVALUE(Table1[CreatedDate]) &&
SELECTEDVALUE(Table2[Schedule date]) >= SELECTEDVALUE(Table1[CreatedDate]) - [relativeDays], 1,
0
)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

@wini_R Its not working, its filter all the date attached screenshot
if i select any row on the first table bottom table filter selected date to last 5 days
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

@itsranga, I believe it works fine, there are likely some other issues in your report/data model, i.e. why would you have the interaction between visuals disabled?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

@wini_R for testing purpose i disabled then i forgot, its works na could you please attach that pbix file
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

@itsranga, I just opened the file you attached earlier, didn't modify anything. Just enable the interaction back and check if it works as expected
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Hey @itsranga,
That could possibly be a difference between today's date and min date in filter context. You can check the following approach:
relativeDays =
VAR _minDate = MIN(calTab[Date])
VAR _diff = TODAY() - _minDate
RETURN INT(_diff)+1
Hope it helps!

Helpful resources
Join us at the Microsoft Fabric Community Conference
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Power BI Monthly Update - February 2025
Check out the February 2025 Power BI update to learn about new features.

Subject | Author | Posted | |
---|---|---|---|
04-04-2024 03:51 AM | |||
05-13-2024 12:29 AM | |||
10-16-2019 09:05 PM | |||
09-05-2018 03:52 AM | |||
07-26-2024 06:10 PM |
User | Count |
---|---|
86 | |
76 | |
52 | |
39 | |
35 |
User | Count |
---|---|
95 | |
69 | |
55 | |
52 | |
46 |