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
SimonSeez
Helper III
Helper III

Help with using Date Dimension Table

Hello, 

 

I get data from my SQL DB with Months as column headers and the values underneath. I want to perform financial calculations that are time based so I made a date dimension table. (https://radacad.com/all-in-one-script-to-create-date-dimension-in-power-bi-using-power-query)

 

The question is how do I connect both tables. My SQL Table looks like this 

 

Unit Name | Jan | Feb | Mar | Apr | May | June | XXX | Dec 

 

Best Regards,

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@SimonSeez , Unpivot the the table create a date

 

date = "01-" & [Month] & "-"& [Year]

 

or

date = "01-" & [Month] & "-2020"

 

Month you will get from unpivoting

View solution in original post

4 REPLIES 4
amitchandak
Super User
Super User

@SimonSeez , Unpivot the the table create a date

 

date = "01-" & [Month] & "-"& [Year]

 

or

date = "01-" & [Month] & "-2020"

 

Month you will get from unpivoting

Hello @amitchandak

Thank you for your assistance with my previous question. I have another variant of the same problem. This time I have a much longer list of rows. Actually, about 2,000 customers with monthly figures of revenue generated. Would you still recommend unpivoting to enable me to get a single date column which I can connect to my calender table?

See sample table

Customer Name | Customer ID | Jan Revenue | Feb Revenue | Mar Revenue | xxxxxxxx | Dec Rev

Hope to read from you.

Best Regards,

Simon

Yes, you still should use "Unpivot Other columns"


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Thank you very much @amitchandak 

 

This solved the issue. 

 

Best Regards,

Simon

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.

Top Solution Authors