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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
meyer
Regular Visitor

Slicer element and date dimension

Hi everybody,

 

Here's my data model :

power_bi_question.PNG

 

There is several joins between my fact table and my dimensions ones. The first one is between GRP_AFFAIRE and ID_CLIENT and the others are between all the DATE_* fields and ID_DATE.

 

Now, I want to display a Slicer element on my dashboard that will contain the field YEAR (ANNEE in my Date dimension). The problem is that when I made my sql database, I've integrated dates from 01/01/1900 to 01/12/2100 as I wanted to have an exhaustive dimension. When I put the slicer with the year field on my dashboard, I have years from 1900 to 2100 that appears.

 

How can I manage to display only years that are present on my fact table (like a sort of inner join between facts and date_dim) ?

 

Thanks in advance

 

 

1 ACCEPTED SOLUTION
v-yulgu-msft
Microsoft Employee
Microsoft Employee

Hi @meyer,

 

Please add a calculated column in your date dimention table. Then, add this new column to slicer, this way, the slicer will display only years that are present on fact table.

Existing Year =
LOOKUPVALUE ( myFact[Date].[Year], myFact[Date].[Year], 'Date Dim'[Year] )

1.PNG

 

Best regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
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

1 REPLY 1
v-yulgu-msft
Microsoft Employee
Microsoft Employee

Hi @meyer,

 

Please add a calculated column in your date dimention table. Then, add this new column to slicer, this way, the slicer will display only years that are present on fact table.

Existing Year =
LOOKUPVALUE ( myFact[Date].[Year], myFact[Date].[Year], 'Date Dim'[Year] )

1.PNG

 

Best regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Jan NL Carousel

Fabric Community Update - January 2025

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