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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Anonymous
Not applicable

Do you have to have a date column to use time intelligence functions?

Hi,

 

I am trying to use time intelligence functions to eventually work out MTD, YTD, YOY Actuals and Percentages. My data looks like the following:

Data Source

MMYYYYDescription Level1Description Level2RevenueVolumeCustomerIDSegment
12017ShirtsSmall101123Youth
12017TrousersMedium152124Youth
12017ShirtsSmall101125Middle
12017TrousersLarge252126Old
12017ShirtsLarge303127Middle

 

I created a date table and created a relationship between Year on the date table and YYYY in the data source. However, when I try to use functions like SAMEPERIODLAST YEAR or DATEADD it does not work. Do I need to have an actual date column in order to use time intelligence functions?
The data spans to 2021.

 

Regards,

Dr_Watcher

6 REPLIES 6
Anonymous
Not applicable

@amitchandak @selimovd thanks I have created the date column and a relationship between that column and the date column in the date table. However, I still ran into an issue.

I think created the following measures:

Total Volume = SUM('Data Source'[VOLUME])
Total Volume LY = CALCULATE([Total Volume], SAMEPERIODLASTYEAR('Date Table'[Date]))
 
However, its still not working as the table below shows Total Volume = Total Volume LY
 
Dr_Watcher_0-1618409606391.png

 

Hey @Anonymous ,

 

can you show a picture of the date table and the connection?

The date table has to have single days, in the table you post I don't see a proper date like 01.01.2021

 

If you need any help please let me know.
If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍
 
Best regards
Denis
 
Anonymous
Not applicable

Hi @selimovd  see below:

Date Table:

Dr_Watcher_0-1618469821953.png

 

Relationship:

Dr_Watcher_1-1618470634976.png

 

Thanks
Dr_Watcher

Hey @Anonymous ,

 

your measure [Total Volume] ist the SUM('Data Source'[VOLUME]), the relationship you show is between your date table and the table 'All - Copy'.

 

How does the relationship between the date table and the table 'Data Source' look like?

 

If you need any help please let me know.
If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍
 
Best regards
Denis
 
amitchandak
Super User
Super User

@Anonymous , I think you need to create a date in table and join that with date table.

 

Create a date like

Date = Date([Year], [month],1)

selimovd
Super User
Super User

Hey @Anonymous ,

 

all the time intelligence functions work only if you have a proper date table that needs each day of the year in the specific time frame.

So if you create a proper date table and connect it to your table, then the time functions will work.

 

If you need any help please let me know.
If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍
 
Best regards
Denis
 

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.