Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

Calculated table with two tables as origin

I have a live data table with a limit of days of history and a history table where the data is written a few days before it is deleted from the live table

 

For example, my data looks like this

ContainerDateTable1_Live_unitsTable2_history_units
A05/05/2017023
B05/06/20171515
C05/07/2017300

 

 

I want to obtain the following table

ContainerDateUnits 
A05/05/201723 
B05/06/201715 
C05/07/201730 

 

What's the best way to do this on Power BI?

 

SUMMARIZE?

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Solved

 

Unidades = IF(RELATED(CI_Unidades[CONTAINER_ID])<>"";CALCULATE(SUM(CI_Unidades[SUM(UNIT_QTY)]);FILTER(CI_Unidades;CI_Unidades[CONTAINER_ID]=EARLIER(Reprocessamento_18072017[CB])));IF(RELATED(CH_Unidades[CONTAINER_ID])<>"";CALCULATE(SUM(CH_Unidades[Unidades]);FILTER(CH_Unidades;CH_Unidades[CONTAINER_ID]=EARLIER(Reprocessamento_18072017[CB])))))

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Solved

 

Unidades = IF(RELATED(CI_Unidades[CONTAINER_ID])<>"";CALCULATE(SUM(CI_Unidades[SUM(UNIT_QTY)]);FILTER(CI_Unidades;CI_Unidades[CONTAINER_ID]=EARLIER(Reprocessamento_18072017[CB])));IF(RELATED(CH_Unidades[CONTAINER_ID])<>"";CALCULATE(SUM(CH_Unidades[Unidades]);FILTER(CH_Unidades;CH_Unidades[CONTAINER_ID]=EARLIER(Reprocessamento_18072017[CB])))))

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.