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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
anjcampo
New Member

Year Slicer

Hi Can someone know how to create A Dax measure to year slicer using 3 date columns in different table (3 table), the matrix is showing month values and I would like to have the 1 (Year) slicer visual for the 3 matrix visuals. Thank you.

1 REPLY 1
Fowmy
Super User
Super User

@anjcampo 

Create a dates table and connect (using relationship) it to those three tables, then you will be able to use the Year column on the slicer to filter all the visuals.


Here is the code to create a dates table, chagne the date range as needed:

Dates = ADDCOLUMNS(
   CALENDAR("01/01/2022","31/12/2022"),
   "Month No" , MONTH([Date]),
   "Month Name" , FORMAT( [Date] , "Mmmm" ),
   "Year" , YEAR([Date]),
   "Month Year No" , (YEAR([Date]) * 100) + MONTH	([Date]),
   "Month Year" , FORMAT( [Date] , "Mmm yyyy"),
   "Quarter" , QUARTER([Date]),
   "Year Qtr" , FORMAT( [Date] , "YYYY \QQ"),
   "Week Day" , WEEKDAY([Date],2),
   "Week" , FORMAT( [Date] , "Dddd" )

)



Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.