cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
dvhez Regular Visitor
Regular Visitor

Merge query with daily values and other with monthly values?

I have this table that shows daily values for this 'Busbar' (also hour detail).

 

PBIDesktop_2018-10-11_11-04-11.png

 

Also,  I have this other query which only shows values for every month (in source .xlsx file I wrote "august-18" but it asummes the first day of that monyh). My objective then, is to take the monthly average of the query above (which has 31 days for august-18, for example) and merge it with this second query that has a value for the entire month. 

 

PBIDesktop_2018-10-11_11-06-49.png

What I'm thinking to do is to create a 'Month' column in both queries, but the first query contains about 50 million rows and I'd like to check if there's a better approach.

 

Thanks! 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Anonymous
Not applicable

Re: Merge query with daily values and other with monthly values?

Hi @dvhez,

 

Not sure if you have an issue or just looking for an optimal solution but I'd proceed by adding a month column into the first query, then grouping by month (+other columns you want to group by) and aggregating the column you want as average. This will give you table with monthly averages. Then that can be merged with the other table.

 

Does this approach help or have I misunderstood your objective?

 

Br,

T

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Re: Merge query with daily values and other with monthly values?

Hi @dvhez,

 

Not sure if you have an issue or just looking for an optimal solution but I'd proceed by adding a month column into the first query, then grouping by month (+other columns you want to group by) and aggregating the column you want as average. This will give you table with monthly averages. Then that can be merged with the other table.

 

Does this approach help or have I misunderstood your objective?

 

Br,

T

View solution in original post

Helpful resources

Announcements
Can You Solve These Challenge

Challenge: Can You Solve These?

Find out how to participate in the first Power BI 'Can You Solve These?' challenge.

Community News & Announcements

Community News & Announcements

Get your latest community news and announcements.

Virtual Launch Event

Microsoft Business Applications October Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

Community Kudopalooza

Win Power BI Swag with Community Kudopalooza!

Each week, complete activities and be qualified in the drawing for cool Power BI Swag.

Users Online
Currently online: 6 members 2,071 guests
Please welcome our newest community members: