Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!
Hello, I have a question.
I am learning Power BI and I want to implement dynamic filtering based on user interaction within the dashboard.
Specifically, I need the user to select a date from a list, and then have that selected date used internally to perform a calculation: adding one month to it.
After that calculation, the resulting date needs to be compared against two fields in a fact table: Fecha and Vencimiento. The logic should work as follows:
The idea is to show in different graphics all of the registers that satisfy the condition described before. I initially tried to accomplish this using slicers, but from what I’ve tested so far, slicers only filter directly by fields. In other words, I haven’t been able to create more complex or computed filters using slicers alone.
Hi @Jan03 ,
I just wanted to check if the issue has been resolved on your end, or if you require any further assistance. Please feel free to let us know, we’re happy to help!
Thank you.
Hi @Jan03 ,
Right now your slicer table is correctly disconnected, but your row-level measure is being evaluated in an aggregated context, so MIN() or SELECTEDVALUE() isn’t reliably pulling the current row’s Fecha/Vencimiento. That’s why it always returns false.
Try again with this measure:
InRange =
VAR SelDate = SELECTEDVALUE ( SlicerDate[Date] )
VAR SelPlus1 =
EDATE ( SelDate, 1 )
VAR RowVenc =
SELECTEDVALUE ( Fact[Vencimiento] )
VAR RowFecha =
SELECTEDVALUE ( Fact[Fecha] )
RETURN
IF (
NOT ISBLANK ( SelDate ) &&
NOT ISBLANK ( RowVenc ) &&
NOT ISBLANK ( RowFecha ) &&
SelPlus1 >= RowVenc &&
SelPlus1 < RowFecha,
1, 0)
For each visual you want filtered drag InRange into Visual-level filters and set it to is 1.
Hope this helps.
Thank you.
It doesn't work, but I appreciate your time. The measure is always 0, but like i said before, the problem isnt the data because when i apply filters in each object like the image, it works.
Use a date table just for the slicer (it must not relate to the fact table):
SlicerDate =
CALENDAR ( DATE(2020,1,1), DATE(2035,12,31) )
Put SlicerDate[Date] on a slicer.
InRange (row) =
VAR SelDate = SELECTEDVALUE ( SlicerDate[Date] )
VAR SelPlus1 = EDATE ( SelDate, 1 )
VAR Venc = MIN ( Fact[Vencimiento] )
VAR Fec = MIN ( Fact[Fecha] )
RETURN
IF (
NOT ISBLANK ( SelDate )
&& SelPlus1 >= Venc
&& SelPlus1 < Fec,
1,
0
)
For each visual you want to filter:
Drag InRange (row) into the visual-level filters
Set it to is 1
This will make the visual only show records where:
SelectedDate + 1 month >= Vencimiento and SelectedDate + 1 month < Fecha
Thanks, but it doesnt work. I did exactly what you said. Probably i made a mistake in the medium steps. And the problem isn't the data.
I think the only issue is that your initial variable is potentially pointed to the calendar table that has a relationship to the fact table and not the disconnected SlicerDate[Date] table you created for the slicer.
I cant see a relationship between tables. The calendar table (which creates the slicer) is apart.
Hi There!
Please consider this solution:
Step 1: Create a disconnected Calendar table in your data model All the calendar references in these measures must be to the disconnected table
Step 2 Date Slicer: Use the Drop Down slicer style with your date field but add other fields to make selection easier. Add Year, Quarter, Month, Date to the fields section of the date slicer and this will allow you to pick a specific date.
Step 3 Measure to select the date: Create a measure like this:
Selected Date = Max(Calendar[date]) --this grabs the max date in the selected context
Step 4 Add Date Measure:
AddOneMonth =
VAR _DateSelected = [SelectedDate]
VAR _AddOneMonth = CALCULATE( DATEADD( Calendar[Date], 1, MONTH ), Calendar[Date] = _DateSelected )
RETURN _AddOneMonth
Step 5 Criteria Measure:
MeetsCriteria =
SWITCH(TRUE(),
Table[Fecha] > [AddMonthToSelected] && Table[Vencimiento]< [AddMonthToSelected],
1, 0
)
Step 6: Add this column to your table visual and use the filter pane to filter to the value you are desiring
Thats the thing i wanted, but im having trouble with the step 5. The column you described at the step 5 is always false. Probably i did one of the previous steps wrong, but the measure of the steps 3 and 4 with its respective value seems okay, their values update in real time when i choose one or other option in the slicer.
Make sure that the correct comparisons are happening for the correct table. Also I think I forgot something in the last measure:
MeetsCriteria =
SWITCH(TRUE(),
SelectedValue(Table[Fecha]) > [AddMonthToSelected] && SelectedValue(Table[Vencimiento])< [AddMonthToSelected],
1, 0
)
Vote for your favorite vizzies from the Power BI World Championship submissions!
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 66 | |
| 51 | |
| 42 | |
| 25 | |
| 22 |
| User | Count |
|---|---|
| 140 | |
| 116 | |
| 56 | |
| 37 | |
| 31 |