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
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
Employee
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
Employee
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!

@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
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.