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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

Show all values except values that are filtered out by time slicer

Hi all,

 

I have a table:

Created date / Name / Closed date

1.1.2019 / project A / <none>

1.1.2019 / project B / 20.2.2019

2.1.2019 / project C / <none>

10.2.2019 / project D / 3.3.2019

 

I have a time slicer. When user select a date interval, user expect to see only ongoing projects.

E.g.

If user selects 1.1.2019 - 1.2.2019, the result should be:

1.1.2019 / project A / <none>

1.1.2019 / project B / 20.2.2019

2.1.2019 / project C / <none>

 

if user selects 1.2.2019 - 1.3.2019, the result should be:

1.1.2019 / project A / <none>

2.1.2019 / project C / <none>

10.2.2019 / project D / 3.3.2019

 

Any idea how i can do this? Thank you for help!

1 ACCEPTED SOLUTION
Nolock
Resident Rockstar
Resident Rockstar

Hi @Anonymous,

all solutions I've seen were about creating a list of all dates between Created date and Closed date and using the slicer on the new field. But it works only if your range has both timestamp, a start and an end one.

 

let
    Source = FactTableOrig,
    #"Added ListOfDatesBetweenFromDateAndToDate" = Table.AddColumn(Source, "ListOfDatesBetweenFromDateAndToDate", each {Number.From([FromDate])..Number.From([ToDate])}),
    #"Expanded ListOfDatesBetweenFromDateAndToDate" = Table.ExpandListColumn(#"Added ListOfDatesBetweenFromDateAndToDate", "ListOfDatesBetweenFromDateAndToDate"),
    #"Changed Type To Date" = Table.TransformColumnTypes(#"Expanded ListOfDatesBetweenFromDateAndToDate",{{"ListOfDatesBetweenFromDateAndToDate", type date}}),
    #"Rename New Column To InRangeDate" = Table.RenameColumns(#"Changed Type To Date",{{"ListOfDatesBetweenFromDateAndToDate", "InRangeDate"}})
in
    #"Rename New Column To InRangeDate"

Capture.PNG

 

And then in Power BI Desktop apply the slicer on the new InRangeDate field: 

Capture2.PNG

View solution in original post

1 REPLY 1
Nolock
Resident Rockstar
Resident Rockstar

Hi @Anonymous,

all solutions I've seen were about creating a list of all dates between Created date and Closed date and using the slicer on the new field. But it works only if your range has both timestamp, a start and an end one.

 

let
    Source = FactTableOrig,
    #"Added ListOfDatesBetweenFromDateAndToDate" = Table.AddColumn(Source, "ListOfDatesBetweenFromDateAndToDate", each {Number.From([FromDate])..Number.From([ToDate])}),
    #"Expanded ListOfDatesBetweenFromDateAndToDate" = Table.ExpandListColumn(#"Added ListOfDatesBetweenFromDateAndToDate", "ListOfDatesBetweenFromDateAndToDate"),
    #"Changed Type To Date" = Table.TransformColumnTypes(#"Expanded ListOfDatesBetweenFromDateAndToDate",{{"ListOfDatesBetweenFromDateAndToDate", type date}}),
    #"Rename New Column To InRangeDate" = Table.RenameColumns(#"Changed Type To Date",{{"ListOfDatesBetweenFromDateAndToDate", "InRangeDate"}})
in
    #"Rename New Column To InRangeDate"

Capture.PNG

 

And then in Power BI Desktop apply the slicer on the new InRangeDate field: 

Capture2.PNG

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 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