Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
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?
Solved! Go to Solution.
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.
CompleteTable = ADDCOLUMNS(
CROSSJOIN(
CALENDAR(MIN(Payment[Date]), MAX(Payment[Date])),
DISTINCT(Payment[Name])),
"Amount",
COALESCE(LOOKUPVALUE(Payment[Amount],Payment[Date],[Date]), BLANK())
)
Create a one-to-many relationship from table“Payment” to table“CompleteTable” by “Date” columns.
Put “Date”, “Amount” from table“CompleteTable” and “Name” from table“Payment” into the visual object. Put “Date” from table“CompleteTable” into the slicer.
Here is my final test result.
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.
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.
CompleteTable = ADDCOLUMNS(
CROSSJOIN(
CALENDAR(MIN(Payment[Date]), MAX(Payment[Date])),
DISTINCT(Payment[Name])),
"Amount",
COALESCE(LOOKUPVALUE(Payment[Amount],Payment[Date],[Date]), BLANK())
)
Create a one-to-many relationship from table“Payment” to table“CompleteTable” by “Date” columns.
Put “Date”, “Amount” from table“CompleteTable” and “Name” from table“Payment” into the visual object. Put “Date” from table“CompleteTable” into the slicer.
Here is my final test result.
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.
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
Proud to be a Super User! | |
Date tables help! Learn more
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
10 | |
10 | |
10 | |
9 | |
7 |
User | Count |
---|---|
17 | |
12 | |
11 | |
11 | |
11 |