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

A new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.

Reply
ahmadhammoud
Regular Visitor

Dynamic Filter

  1. Dears, 
  2. i have a table with multi Date for example:
  3. ID, Arrive Date, Charge Date, Dischare Date
  4. and i have a date slicer from 2020 to 2024 
    i need to filter the table have the column mentioned above by a drop down list 
  5. so if selected value from the list is Arrive then filter the table where Arrive Date between 
  6. ---> if slicer is filtered so filter the table between the slicer min and max dates 
  7. ---> if slicer is not filter so filter the table between last start and end month 
    the below DAX  not working with error "The expression refers to multiple columns. Multiple columns cannot be converted to a scalar value."

    FIN_List_Posting_Date_Filter =
    VAR DateList = SELECTEDVALUE(My_Report_Date[Report],"Posting Date")
    VAR SlicerMIN = MIN(DateTimeTable[DateTime])
    VAR SlicerMAX = MAX(DateTimeTable[DateTime])
    /*VAR StartDateMIN= IF(NOT(ISFILTERED(My_Report_Date[Report])),[StartDate])
    VAR StartDateMAX= IF(NOT(ISFILTERED(My_Report_Date[Report])),[EndDate])*/
    VAR
    PostedFilter = SWITCH( TRUE(),
    DateList ="Posting Date" , IF(ISFILTERED(DateTimeTable[DateTime]),
    CALCULATETABLE(
    FILTER(Charges,
    Charges[POSTED_DT_TM] >= SlicerMIN &&
    Charges[POSTED_DT_TM] <= SlicerMAX + TIME(0, 59, 59))),
    CALCULATETABLE(
    FILTER(Charges,
    Charges[POSTED_DT_TM] >= [StartDate] &&
    Charges[POSTED_DT_TM] <= [EndDate]+1))))


    RETURN PostedFilter



1 REPLY 1
lbendlin
Super User
Super User

Use a disconnected table for your slicer, and a measure filter for the visual.

Helpful resources

Announcements
May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.