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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register 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.

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.

Top Solution Authors