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
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
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.