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

The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!

Reply
sanman
Helper I
Helper I

Issue using date slicer from dynamic table

For sake of simplicity here's my scenario:

I have a table Sales with entrydate column. It contains data from 2017 to 2020.

I wanted to use the power of DAX Date Table so created a new DateTable from year 2000 to 2030 and connected the date fields in the two table.

Now I want to put a slicer so I use the new DateTable slicer to filter with year, but the slicer is showing years 2000 to 2030 (from the date table instead of only showing 2017 to 2020). 

How do i have the slicer only show me the valid years instead of all years in the dynamic table?

1 ACCEPTED SOLUTION
DataZoe
Microsoft Employee
Microsoft Employee

If you click on the date slicer, you can add a field from the sales table or a measure to the "filters on this visual" part of the filters pane. Then filter it to all "is not blank".  You can also hide that from the end users when it's published.

Respectfully,
Zoe Douglas (DataZoe)



Follow me on LinkedIn at https://www.linkedin.com/in/zoedouglas-data
See my reports and blog at https://www.datazoepowerbi.com/

View solution in original post

4 REPLIES 4
DataZoe
Microsoft Employee
Microsoft Employee

If you click on the date slicer, you can add a field from the sales table or a measure to the "filters on this visual" part of the filters pane. Then filter it to all "is not blank".  You can also hide that from the end users when it's published.

Respectfully,
Zoe Douglas (DataZoe)



Follow me on LinkedIn at https://www.linkedin.com/in/zoedouglas-data
See my reports and blog at https://www.datazoepowerbi.com/

Wow that worked DataZoe. Thanks!
That now brings me to another issue 🙂

For sake of having a nice Dashboard, I wanted to present different data into the same dashboard so I added another table from another datasource with a date field - which I connected to the Dax dateTable. I want to use the same slicer to filter for the year selected for both the original Sales Table visual and the new Table visuals - but as soon as I connected the date field from New Table to the Dax DateTable, now the slicer is showing me all the years ie from 2000 to 2030 again!

DataZoe
Microsoft Employee
Microsoft Employee

@sanman that is interesting! It would depend on which field you did use to filter the date slicer, what was the date range of the new data, and what type of relationships are between all the tables.

 

I should mention another method to do it is to create a both directions relationship between Sales and Date tables. Sometimes this excludes more data than expected and is not an ideal solution.

Respectfully,
Zoe Douglas (DataZoe)



Follow me on LinkedIn at https://www.linkedin.com/in/zoedouglas-data
See my reports and blog at https://www.datazoepowerbi.com/

There are no relations between the two tables. I just wanted to show two separate metrics on the dashboard using the same year slicer.

 

The both direction relationship worked. Thank you!

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! It's time to submit your entry.

January Power BI Update Carousel

Power BI Monthly Update - January 2026

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