Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
Gueray
Regular Visitor

Filter a table based on a slicer

Hello Everybody !

 

I'm new to power BI and so i'm trying to filter a table based on a slicer 

I have a [Date added] for the data and i want to select only rows where the date difference between [date added] and today

Here's the dax query that i came up with so far : 

Filter= IF(VALUE(DATEDIFF('Extraction devis organisation'[Date added].[Date];TODAY();DAY)) >= MIN(Slicer[SLICER Selection]) ; "O";"N")

 

and on the filter panel i select only rows with "O"

 

The slicer table has no relationships with other tables and yet it doesn't work

 

Does anyone have a clue why 

 

Thany you

5 REPLIES 5
Eric_Zhang
Microsoft Employee
Microsoft Employee


@Gueray wrote:

Hello Everybody !

 

I'm new to power BI and so i'm trying to filter a table based on a slicer 

I have a [Date added] for the data and i want to select only rows where the date difference between [date added] and today

Here's the dax query that i came up with so far : 

Filter= IF(VALUE(DATEDIFF('Extraction devis organisation'[Date added].[Date];TODAY();DAY)) >= MIN(Slicer[SLICER Selection]) ; "O";"N")

 

and on the filter panel i select only rows with "O"

 

The slicer table has no relationships with other tables and yet it doesn't work

 

Does anyone have a clue why 

 

Thany you


@Gueray

So I guess that the Filter = is an expression for a calculated column, right? Slicer works on visual level, it can't effect calculated column/table which based on source data. In summary, calculate column/table has Pretreatmented before selected on slicer, instead of calculated column, try to apply a filter expression to your measures.

 

measure =
CALCULATE (
    [yourMeasureHere],
    FILTER (
        'Extraction devis organisation',
        TODAY () - MIN ( 'Extraction devis organisation'[Date added] )
            >= MIN ( Slicer[SLICER Selection] )
    )
)

@Eric_Zhang

 

[yourmeasurehere] what do you mean by it because in my example i didn't introduce any measure

Thank you


@Gueray wrote:

@Eric_Zhang

 

[yourmeasurehere] what do you mean by it because in my example i didn't introduce any measure

Thank you


@Gueray

You could replace the measure like SUM('yourtable'[yourColumn])

I did what you said but unforunately it didn't work do you have any other method ?


@Gueray wrote:

I did what you said but unforunately it didn't work do you have any other method ?


@Gueray

Would you mind post any sample data and expected output so that I could have a better understanding on your case?

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.