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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
marakud971
Regular Visitor

Show active Years (years of fact table) in my slicer

Hi everybody,

 

In my Year slicer,
I have all the years from my calendar table.
However, I only want to display the available years from my fact table.

To achieve this,
I used the date from my fact table in my slicer by creating a calculated dimension Year and Month, and it works well.

However, this modification has caused an error in my calculated measure Sales Year-1 which was fetching my Date field from my Calendar table.

SALES Y-1 = CALCULATE( [SALES], SAMEPERIODLASTYEAR(T_DIM_CALENDRIER[Date]))
 
I know that I need a link between my slicer and my calculated measure. I have tried different manipulations, but I can't use my measure anymore if I keep my modification on my slicer.

Even when using the date in my fact table in my calculated measure, it doesn't work. Or even by adding the double filtering direction in the join. Can you please help me?

 

marakud971_0-1683053859832.png

marakud971_1-1683053950574.png

 

Thanks a lot 

 

 

1 ACCEPTED SOLUTION

@marakud971 , Slicer on any period, Period on Visual and date in Measure all should come from T_DIM_Calendar and T_DIM_Calendar should be marked as date table and should have all the dates.

 

In such a case, it should work with a single directional join.

 

Do not use date in TI function from you fact/table

View solution in original post

3 REPLIES 3
amitchandak
Super User
Super User

@marakud971 , You measure seems fine. But if you want to use inactive join, make sure you use a measure which already have userelationship in TI measue

 

or try like

 

example

calculate( calculate( SUM(Sales[Sales Amount]),USERELATIONSHIP ('Sales'[CreateDate], 'Date'[Date])),DATESMTD('Date'[Date]))

 

MakeWhy Time Intelligence Fails - Powerbi 6 Savior Steps for TI :https://youtu.be/OBf0rjpp5Hw
https://amitchandak.medium.com/power-bi-5-key-points-to-make-time-intelligence-successful-bd52912a5b...

 

Hi @amitchandak ,


In my case, i use the active relation in my measure.

Here the error message 

 

marakud971_1-1683063409880.png

 

When i use, in my slicer,  the date field of my Calendar Table , it's okey.
But when i use, in my slicer, the calculated YEAR and Month colunm, it's KO.

 

@marakud971 , Slicer on any period, Period on Visual and date in Measure all should come from T_DIM_Calendar and T_DIM_Calendar should be marked as date table and should have all the dates.

 

In such a case, it should work with a single directional join.

 

Do not use date in TI function from you fact/table

Helpful resources

Announcements
Fabcon_Europe_Social_Bogo

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

Check out the June 2024 Power BI update to learn about new features.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.