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
AnthonyJoseph
Resolver III
Resolver III

Show Dates that blank irrespective of the date slicer selection

Hi,

 

I have a table with 4 columns.


AlexAntidius_1-1639654852783.png

 

 

I want to have "Completed or Stat date" column as date slicer and my table visual should show the rows with the blank date (irrespective of date slicer selection) along with the rows falling in the selected date.

For example:
If I filter by dates 1 - June-21 to 31-Dec-21 in "Completed or Stat date".
My table should show all the rows that are in the date range (1 - June-21 to 31-Dec-21) and also the row items that have a blank value in the "Completed or Stat date".

Thanks,

Alex

 

 

1 ACCEPTED SOLUTION
bcdobbs
Super User
Super User

I would do the following.

1) Create a disconnected date table (if Power Bi puts a relationship in delete it)

 

Date = CALENDARAUTO(12)

 

bcdobbs_1-1639660031850.png

 

2) Add a measure to your table (I called mine Task):

 

Date Filter = 
VAR SelectedDates = 
    CALCULATETABLE (
        VALUES( Task[Completed or Stat Date]),
        TREATAS ( VALUES ( 'Date'[Date] ), Task[Completed or Stat Date] )
    )

VAR RowsToInclude =
    FILTER (
        VALUES( Task[Completed or Stat Date] ),
        SelectedDates || ISBLANK( Task[Completed or Stat Date] )
    )

VAR ShowDate = INT ( NOT ( ISEMPTY ( RowsToInclude ) ) )
    
RETURN 
    ShowDate

 

 

3) Use the date column from your new date table in the slicer.

 

4) In your table visual put the "Date Filter" measure into the visual filter pane and set it to "Is 1"

bcdobbs_2-1639660104071.png

I'm getting I think your desired results:

bcdobbs_4-1639660333848.png

 

 

 



Ben Dobbs

LinkedIn | Twitter | Blog

Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!

View solution in original post

2 REPLIES 2
bcdobbs
Super User
Super User

I would do the following.

1) Create a disconnected date table (if Power Bi puts a relationship in delete it)

 

Date = CALENDARAUTO(12)

 

bcdobbs_1-1639660031850.png

 

2) Add a measure to your table (I called mine Task):

 

Date Filter = 
VAR SelectedDates = 
    CALCULATETABLE (
        VALUES( Task[Completed or Stat Date]),
        TREATAS ( VALUES ( 'Date'[Date] ), Task[Completed or Stat Date] )
    )

VAR RowsToInclude =
    FILTER (
        VALUES( Task[Completed or Stat Date] ),
        SelectedDates || ISBLANK( Task[Completed or Stat Date] )
    )

VAR ShowDate = INT ( NOT ( ISEMPTY ( RowsToInclude ) ) )
    
RETURN 
    ShowDate

 

 

3) Use the date column from your new date table in the slicer.

 

4) In your table visual put the "Date Filter" measure into the visual filter pane and set it to "Is 1"

bcdobbs_2-1639660104071.png

I'm getting I think your desired results:

bcdobbs_4-1639660333848.png

 

 

 



Ben Dobbs

LinkedIn | Twitter | Blog

Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!

Works perfectly as expected. Thank you so much 🙂

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.

Top Solution Authors