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
Sunkari
Responsive Resident
Responsive Resident

Small observation regarding time series analysis

Hi All,

 

I have following model.

Fact_Table(Revenue,Date(Datetype),Datekey(Integer))----(100,"2017/01/01",20170101)

DimDate(Date(Datetype),Datekey(Integer))---("2017/01/01",20170101)

 

 

I can relate both tables either by Datekey or Date column. If I relate based on datekey, time series related functions are not working like ytd,previous year etc where as if i relate with Date they are working fine.

 

What's the root cause of the issue? is it a bug? if not, what's reason for this behavior? Ideally, context should propagate to other tables irrespective of a related column.

 

 

 

 

5 REPLIES 5
v-jiascu-msft
Employee
Employee

Hi @Sunkari

 

Context is a very complicated concept and is a powerful tool that makes the limited number of functions to do more. As far as I know, "Datekey" usually is a bridge to create relationships. The actual "Date" column will be used in the report. Hope this would help.

 

Best Regards!

Dale

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

@v-jiascu-msft Thanks for inputs.

vanessafvg
Super User
Super User

@Sunkari well datekey is a integer and date is a date type, therefore you will not get data functionality off an integer





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




I am using date for all calculations.

 

Something like: Calculate(sum(revuenue),Dateadd(dimdate[Date],-1,Year))

 

 

@Sunkari i dont see any issue with that working as long as date is of date data type is there a problem?





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




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.