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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
nhuda
Helper I
Helper I

How to get data not selected in date filter

Hello,

I did post on similar topic but did not get the answer to the orginal question as we veered towards other things and thought we found the solution.

What would be the way to get the data that falls outside of the selected date range in the date filter.

nhuda_0-1714176969935.png

Like the data that falls before or after the selected date range in the image above.

For some helpful info - I do have a ProjectStartDate column available so getting that info is not an issue:

ProjectProjectStartDateMaterialGroupTestedDateTested
Project Abc8/1/2021A8/1/20210
Project Abc8/1/2021A8/1/20210
Project Abc8/1/2021A9/17/20211
Project Abc8/1/2021A9/17/20211
Project Abc8/1/2021A9/17/20211
Project Abc8/1/2021A9/17/20211
Project Abc8/1/2021A10/26/20211
Project Abc8/1/2021A10/26/20211
Project Abc8/1/2021A12/10/20211
Project Abc8/1/2021A12/10/20211
Project Abc8/1/2021A7/25/20221
Project Abc8/1/2021A7/25/20221
Project Abc8/1/2021A7/25/20221
Project Abc8/1/2021A7/25/20221
Project Abc8/1/2021A7/25/20221
Project Abc8/1/2021A7/25/20221
Project Abc8/1/2021A7/25/20221
Project Abc8/1/2021A7/28/2022

1

So what I need is to get the data for Tested column from the beginning (Project Start Date) to the "From Date" in the date slider, irrespective of what date range was selected there.

I can get the data slected by the date filter easily but not what's outside of that range.

This can't be that difficult but unfortunately no luck so far.

Thanks so much for the help,

nhuda

1 ACCEPTED SOLUTION

Slicers are designed to keep what is selected. I wrote an article about how to do the opposite. 
https://exceleratorbi.com.au/items-not-selected-slicer/



* Matt is an 8 times Microsoft MVP (Power BI) and author of the Power BI Book Supercharge Power BI.

View solution in original post

2 REPLIES 2
nhuda
Helper I
Helper I

Hi @MattAllington ,

 

Sorry I was away for 7 days and could not check the resposnses.

Thank you for the info you provided.

I reviewed and it was interesting to know how to get Not Selected data by using 

 

Not Selected = CALCULATE(COUNTROWS(Data),(EXCEPT(ALL(Simpsons),Simpsons)))

 

However, in my case I need to capture data only for the period before the selected date range, e.g.: 

Full date range (data available): January 1 to December 31.

Selected date range March 19 to August 31 (using date slider)

Not selected = January 1 to March 18 + September 1 to December 31 (provided by the formula above)

I needed = January 1 to March 18 only

 

Thank you very much, it was good information to learn.

Reagrds,

 

nhuda

Slicers are designed to keep what is selected. I wrote an article about how to do the opposite. 
https://exceleratorbi.com.au/items-not-selected-slicer/



* Matt is an 8 times Microsoft MVP (Power BI) and author of the Power BI Book Supercharge Power BI.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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