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
dvhez
Helper II
Helper II

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

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

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

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.