cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
rsbin
Super User
Super User

Summarize Columns from two tables

Hello Folks,

Having difficulty with Summarize and/or Calculated Table.  I am trying to combine data from two tables:

1) DIM_Date_Tabular (Date Dimension Table) - Contains future dates to enable forecasting

2) HourlyStatisticsbyOperator (My Fact table)

 

 

= SUMMARIZE( FILTER( DIM_Date_Tabular, 
		         DIM_Date_Tabular[Date] <= Today() &&
		         DIM_Date_Tabular[Date] >= MIN(HourlyStatisticsByOperator[Date] )),
		         DIM_Date_Tabular[Date],
		         "WorkOrders", SUM(HourlyStatisticsByOperator[AllLiftWorkOrders] ))

 

 In my Fact Table, I have another column called "FacilityName".  I need to group my "WorkOrders" by FacilityName, so final result is as below:

DateFacilityNameWorkOrders
9/13/2021A0
9/13/2021B0
9/13/2021C0
9/13/2021D0
9/13/2021E0
9/12/2021A336
9/12/2021B316
9/12/2021C214
9/12/2021D345
9/12/2021E359
9/11/2021A123
9/11/2021B456
9/11/2021C789
9/11/2021D224
9/11/2021E315

Any assistance would be much appreciated!

 

Thanks in advance and Best Regards

2 REPLIES 2
amitchandak
Super User
Super User

@rsbin , try like

 

SUMMARIZE( HourlyStatisticsByOperator,HourlyStatisticsByOperator[FacilityName],
DIM_Date_Tabular[Date],
"WorkOrders", calculate(SUM(HourlyStatisticsByOperator[AllLiftWorkOrders] )FILTER( DIM_Date_Tabular,
DIM_Date_Tabular[Date] <= Today() &&
DIM_Date_Tabular[Date] >= MIN(HourlyStatisticsByOperator[Date] )))



New Power BI Features
Datamarts: https://youtu.be/8tskWsJTEpg
Field Parameters : https://youtu.be/lqF3Wa1FllE?t=70
Did I answer your question? Mark my post as a solution! Appreciate your Kudos!! !!
Dashboard of My Blogs !! Connect on Linkedin !! Proud to be a Super User!
Want To Learn Power BI
Learn Power BI Beginners !! Advance Power BI Concepts !! Power BI For Tableau User !! Learn Power BI in Hindi !!
!! Subscribe to my youtube Channel !!

Hi @amitchandak,

Thanks kindly for the prompt response.  Unfortunately, doesn't quite work the way I need it to.  I am not getting today's date in the table.  I'm guessing this is due to the fact Today's Date does not exist in my Fact Table.  Any suggestions on how to alter your solution?

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Power BI Dev Camp Session 23 768x460.jpg

Check it Out!

Mark your calendars and join us on Thursday, June 30 at 11a PDT for a great session with Ted Pattison!

June 20 episode 7 with aka link 768x460.jpg

The Power BI Community Show

Join us on June 20 at 11 am PDT when Kim Manis shares the latest on Azure Synapse analytics, the Microsoft Intelligent Data Platform, and notable Power BI Updates from Microsoft Build 2022.

Top Solution Authors
Top Kudoed Authors