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
Peter_Hussy
New Member

Add monthly codes to hourly data from another table

A bit of an unusual one here. Basically, I have two tables of data, one of which contains hourly data spanning two years and the other contains monthly budget codes which I wish to assign to each month's sales data:

Sales Table

DateTimeSales Data
01/01/2022 00:00:00Data 1
01/01/2022 00:01:00Data 2
01/01/2022 00:02:00Data 3
etc.etc.

 

Monthly Budget Codes

DateBudget Code
01/01/2022jan_22_budget_code
01/02/2022feb_22_budget_code
etc.etc.

 

The idea is to create a Line and Cluster Column chart, using the DateTime and Sales Data from the first table for the chart portion, and the Budget Code from the second table as the Line. The underlying data would look something like this:

 

DateTimeSales DataBudget Code
01/01/2022 00:00:00Data 1jan_22_budget_code
01/01/2022 00:01:00Data 2jan_22_budget_code
etc.etc.etc.

 

I have tried various methods, such as creating a calculate column in the Sales table, creating a relationship between the tables, and using a common date table to no avail. I know this isn't an ideal dataset, but I'm inheriting this from someone else. Something to bear in mind is that the Budget Codes table needs to be separate, as it draws from an Excel spreadsheet, so that the finance teams can easily edit these codes, as they often change.

Thanks in advance to anyone who has taken the time to read this. I can provide further clarification if required.

1 REPLY 1
v-henryk-mstf
Community Support
Community Support

Hi @Peter_Hussy ,

 

As you say, this dataset is not very user friendly and after testing it does not seem to give the results you need. Can you provide a more detailed description of the dataset so that I can answer it for you as soon as possible.


Looking forward to your reply.


Best Regards,
Henry

 

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.