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
Anonymous
Not applicable

Connect Dates from different years by month

Hello

 

I have to do a monthly report for my organization, this report should have the values of the year until the present date and compare them with the homologous perríod, into tables and graphics, for the different departmentes in the organization. 

 

I have different excel files one to each department and each one with with two sheets, one to year N and another to year N-1, but I can't connect the dates by month in order to compare them, I have the dates in the row so I am able to filter them until the current month. Until now I have tables from year N connected and tables from year N-1 connected but I cannot connect diferent years. 

 

How can I do it? I already have a lot of measures donne so I cannot reorganized all the work done until now. 

 

In the image the column "Mes" have the complete date of the last day of the month. 

My table now apears like the one in the image with all the combinations of month's possible. But I want the values from: january - january; February- February; March - March, and so on. 

 

I hope the image helps to understand my problem.

 

Thank You

 

 

connections.PNG 

 

Capture4.PNG

1 ACCEPTED SOLUTION
v-juanli-msft
Community Support
Community Support

Hi @Anonymous

Based on my knowledge and experience with Power BI, your dataset structure need to be re-arranged.

For example , for department1, there are tables, one to year N and another to year N-1.

You may create a calendar table with function “calendar”or “calendarauto”, then create  relationships between the calendar table and your tables based on date column.

Please look into the article to learn how to structure your data in power bi

Implementing Power BI Data Modeling with Avi Singh - YouTube

Tutorial: Shape and combine data in Power BI Desktop

https://docs.microsoft.com/en-us/power-bi/desktop-create-and-manage-relationships

 

Or you may provide a simple dataset example for me to analyze.

 

Best Regards

maggie

View solution in original post

4 REPLIES 4
v-juanli-msft
Community Support
Community Support

Hi @Anonymous

Based on my knowledge and experience with Power BI, your dataset structure need to be re-arranged.

For example , for department1, there are tables, one to year N and another to year N-1.

You may create a calendar table with function “calendar”or “calendarauto”, then create  relationships between the calendar table and your tables based on date column.

Please look into the article to learn how to structure your data in power bi

Implementing Power BI Data Modeling with Avi Singh - YouTube

Tutorial: Shape and combine data in Power BI Desktop

https://docs.microsoft.com/en-us/power-bi/desktop-create-and-manage-relationships

 

Or you may provide a simple dataset example for me to analyze.

 

Best Regards

maggie

Anonymous
Not applicable

Thank you very much for your help. 

 

I am a begginer in Power Bi, and those videos that you show me, will gonna help me, for sure, to improve my Power Bi skills. 

 

Thanks. 

Greg_Deckler
Super User
Super User

Can you simply use an Append query to combine your two date tables?


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

I think it is not possible because the columns are not equal. 

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.