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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
Anonymous
Not applicable

Use slicer to exclude and show rows excluded

I want the slicer to display all the customers that have not been visited between a certain period- 

 

I have a calculated column 

LastVisitDate = MAXX(FILTER('All calls', 'All calls'[customer ID]= EARLIER('All calls'[customer ID])), ''All calls'[Date])
 
I tried calculating a column but the result is always "No" . I have added a "between" slicer too
 
Not Visited = IF ( ISBLANKCALCULATE ( MAX ( 'All calls'[Date]) ), FILTER (  'All calls'YEAR ( 'All calls'[Date] ) = YEAR ( 'All calls'[LastVisitDate] ) &&  MONTH ( 'All calls'[Date] ) = MONTH ('All calls'[LastVisitDate] ) &&  'All calls'[customer ID] = EARLIER('All calls'[customer ID]) ) ), "Yes" "No" )
 
I tried finding the solution but couldn't figure out how to apply them to my own case- I would appreciate your help!
1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi  @Anonymous ,

 

You can create measures to achieve your desired results.

Here are the steps you can follow:

1. You need to create a table of unrelated dates to act as a slicer.

 

Date=
CALENDAR(
    DATE(
        2021,1,1),
    DATE(
        2021,4,1))

 

vyangliumsft_2-1708479604791.png

2. Create measure.

 

Flag =
var _mindate=MINX(ALLSELECTED('Date'),'Date'[Date])
var _maxdate=MAXX(ALLSELECTED('Date'),'Date'[Date])
return
IF(
    MAX('All calls'[customer ID]) in SELECTCOLUMNS(FILTER(ALL('All calls'),'All calls'[Date]>=_mindate&&'All calls'[Date]<=_maxdate),"test",'All calls'[customer ID])
,1,0)

 

 

3. Place [Flag]in Filters, set is=1, apply filter.

vyangliumsft_3-1708479616069.png

4. Result:

 

vyangliumsft_0-1708479667006.png

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Hi  @Anonymous ,

 

You can create measures to achieve your desired results.

Here are the steps you can follow:

1. You need to create a table of unrelated dates to act as a slicer.

 

Date=
CALENDAR(
    DATE(
        2021,1,1),
    DATE(
        2021,4,1))

 

vyangliumsft_2-1708479604791.png

2. Create measure.

 

Flag =
var _mindate=MINX(ALLSELECTED('Date'),'Date'[Date])
var _maxdate=MAXX(ALLSELECTED('Date'),'Date'[Date])
return
IF(
    MAX('All calls'[customer ID]) in SELECTCOLUMNS(FILTER(ALL('All calls'),'All calls'[Date]>=_mindate&&'All calls'[Date]<=_maxdate),"test",'All calls'[customer ID])
,1,0)

 

 

3. Place [Flag]in Filters, set is=1, apply filter.

vyangliumsft_3-1708479616069.png

4. Result:

 

vyangliumsft_0-1708479667006.png

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors