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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
annam
Frequent Visitor

Date with few empty dates - hwo to create Between slicer

I have payment date column and trying to create slicer with between. Bu when I select date from slicer it empties table. any work around?

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @annam 

 

My solution is to add missing dates in the source data and fill in the amount as “BLANK”.

In this way, when using a slicer with between, there will be no interval dates that cause visual objects to be empty.

 

  1. Here are the columns included in my example table.  1.png
  2. Create a new table using the following DAX :

    CompleteTable = ADDCOLUMNS(

        CROSSJOIN(

            CALENDAR(MIN(Payment[Date]), MAX(Payment[Date])),

            DISTINCT(Payment[Name])),

            "Amount",

            COALESCE(LOOKUPVALUE(Payment[Amount],Payment[Date],[Date]), BLANK())

    2.png

  3.  Create a one-to-many relationship from table“Payment” to table“CompleteTable” by “Date” columns.  3.png

  4. Put “Date”, “Amount” from table“CompleteTable” and “Name” from table“Payment” into the visual object. Put “Date” from table“CompleteTable” into the slicer.  4.png4-1.png

  5. Here is my final test result.  5.png5-1.png

I hope this solution meets your requirements.

 

 

Best Regards,

Jarvis Tang

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

2 REPLIES 2
Anonymous
Not applicable

Hi @annam 

 

My solution is to add missing dates in the source data and fill in the amount as “BLANK”.

In this way, when using a slicer with between, there will be no interval dates that cause visual objects to be empty.

 

  1. Here are the columns included in my example table.  1.png
  2. Create a new table using the following DAX :

    CompleteTable = ADDCOLUMNS(

        CROSSJOIN(

            CALENDAR(MIN(Payment[Date]), MAX(Payment[Date])),

            DISTINCT(Payment[Name])),

            "Amount",

            COALESCE(LOOKUPVALUE(Payment[Amount],Payment[Date],[Date]), BLANK())

    2.png

  3.  Create a one-to-many relationship from table“Payment” to table“CompleteTable” by “Date” columns.  3.png

  4. Put “Date”, “Amount” from table“CompleteTable” and “Name” from table“Payment” into the visual object. Put “Date” from table“CompleteTable” into the slicer.  4.png4-1.png

  5. Here is my final test result.  5.png5-1.png

I hope this solution meets your requirements.

 

 

Best Regards,

Jarvis Tang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Joe_Barry
Super User
Super User

Hi @annam 

Why not use a Date Table?

Create an Active One to Many relationship from the Date column in the Date table to the payment date column in your table.

Create a slicer from the Date column in the date table and use the columns from the Data table in a visual that has a measure from your table.

 

Hope this helps

Joe




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Learn about the Star Schema, it will solve many issues in Power BI!

Date tables help! Learn more



LinkedIn


Let's connect on LinkedIn


Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 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.