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
FADAVI
Frequent Visitor

Remove visual filter context

Hi,

I want that whatever the value I click in the table on the left, the red card on the right show the min value of the slicer above.
I wasn't able to make it work cause it shows me the clicked value in my min function.
I don't want to edit interraction from the table to the card because I need to capture the clicked value in the table as a max.

The all() function didn't helped me because It totally removes the slicer filter. So it shows me the 01/01/2024

 

In few words:
If no click on the table
MIN = min slicer
MAX = max slicer

If click on a value of the table
MIN = min slicer
MAX = clicked value

Thanks for your help

 

FADAVI_0-1760534983972.png

 

1 ACCEPTED SOLUTION

@FADAVI Here an updated PBIX, in the previous there was a bug.

 

If it fix your problem, please accept this answear as a solution!

 

BBF


💡 Did I answer your question? Mark my post as a solution!

👍 Kudos are appreciated

🔥 Proud to be a Super User!

Community News image 1920X1080.png

 

View solution in original post

10 REPLIES 10
FADAVI
Frequent Visitor

You're the one !! Thanks a lot.
It seems to work . 

I will try to make it work in my real use case. 

I just don't understand what you did, I will try to

Have a good one. 

 

 

@FADAVI Here an updated PBIX, in the previous there was a bug.

 

If it fix your problem, please accept this answear as a solution!

 

BBF


💡 Did I answer your question? Mark my post as a solution!

👍 Kudos are appreciated

🔥 Proud to be a Super User!

Community News image 1920X1080.png

 

BeaBF
Super User
Super User

@FADAVI Hi!

Try with:

 

RedCard_Value :=
VAR MinSlicer =
CALCULATE(
MIN('Table'[Date]),
REMOVEFILTERS('Table'[Date]) -- ignore table click, keep slicer
)
VAR ClickedOrMax =
IF(
HASONEVALUE('Table'[Date]),
SELECTEDVALUE('Table'[Date]), -- clicked value
CALCULATE(MAX('Table'[Date])) -- max from slicer
)
RETURN
ClickedOrMax

 

BBF


💡 Did I answer your question? Mark my post as a solution!

👍 Kudos are appreciated

🔥 Proud to be a Super User!

Community News image 1920X1080.png

 

FADAVI
Frequent Visitor

Thanks for your answer. It will not show the min value of the slicer. It will show the min value of the whole date column. 
In my example I set the slicer value from 01/01/2025 to 31/12/2025. Your measure will show the first of january of 2024 instead of 2025

@FADAVI Retry with:

 

RedCard_Value :=
VAR MinSlicer =
CALCULATE(
MIN('Table'[Date]),
ALLSELECTED('Table'[Date]) // keep slicer, ignore table click
)
VAR Clicked =
SELECTEDVALUE('Table'[Date])
RETURN
IF(
HASONEVALUE('Table'[Date]),
Clicked, // when user clicks in table
MinSlicer // when nothing clicked
)

 

BBF


💡 Did I answer your question? Mark my post as a solution!

👍 Kudos are appreciated

🔥 Proud to be a Super User!

Community News image 1920X1080.png
FADAVI
Frequent Visitor

VAR Clicked =
SELECTEDVALUE('calendar'[Date])
Will not give me the min but the actual clicked value
 
And your first var is the one I originnaly used 
    CALCULATE(
        MIN('calendar'[date]),
        ALLSELECTED('calendar'[date])
    )

@FADAVI So I don't know if I undestood your request, can you better explain it?

RedCard_Value :=
VAR SlicerRange =
CALCULATETABLE(
VALUES('calendar'[Date]),
ALLSELECTED('calendar'[Date])
)
VAR MinSlicer =
CALCULATE(
MIN('calendar'[Date]),
REMOVEFILTERS('calendar'[Date]),
KEEPFILTERS(TREATAS(SlicerRange, 'calendar'[Date]))
)
VAR ClickedValue =
SELECTEDVALUE('calendar'[Date])
RETURN
IF(
HASONEVALUE('calendar'[Date]),
ClickedValue, -- When a table value is clicked
MinSlicer -- When nothing is clicked
)

 

BBF


💡 Did I answer your question? Mark my post as a solution!

👍 Kudos are appreciated

🔥 Proud to be a Super User!

Community News image 1920X1080.png
FADAVI
Frequent Visitor

Ok let's explain it another way. 
I want all the dates in the range set in the slicer. 
I want when I click in the table to be able to have a range from the start of the slicer to the clicked value in the table, for another visual that used both of these values. 

So I want MIN to be always the same and MAX to be either the one in the slicer or if I click on a value the selected value. 

I want my MIN value to keep being the first value of the slicer it means removing the visual filter context when I click on value


@FADAVI ok, try with:

 

Min_Slicer_Date :=
VAR SlicerRange =
CALCULATETABLE(
VALUES('Calendar'[Date]),
ALLSELECTED('Calendar'[Date]) // gets only the slicer range
)
VAR MinSlicer =
CALCULATE(
MIN('Calendar'[Date]),
REMOVEFILTERS('Calendar'[Date]), // remove visual filters (table click)
KEEPFILTERS(TREATAS(SlicerRange, 'Calendar'[Date])) // reapply slicer range
)
RETURN
MinSlicer

 

BBF


💡 Did I answer your question? Mark my post as a solution!

👍 Kudos are appreciated

🔥 Proud to be a Super User!

Community News image 1920X1080.png
FADAVI
Frequent Visitor

TY again for your help, I appreciate. It's a tricky problem. I doesn't work either. 

On the screenshot bellow I clicked on 03/01/2025. It should have been 01/01/2025 in your card

FADAVI_0-1760538953187.png

 

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.