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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
MoMrCrane
Frequent Visitor

translation table for two databases

Earlier this year we transitioned our ERP. The old and new ERP is the same software, but different instances. The tables in old/new ERP are named the same. They are 2 seperate databases. I'm attempting to calculate total revenue year to date using TOTALYTD. So I have to calculate from 1/1/2024 - 3/31/2024 in the old ERP and from 4/1/2024 - Today() in the new ERP. 

 

 

BilledYTD =
 //revenue from production ERP
TOTALYTD(SUM('Invoice Details'[ActAmount]), 'Date'[Date] ) 
+ 
//revenue from legacy ERP
TOTALYTD(SUM('Legacy_MRC_INVOICE_DETAILS'[ActAmount]), 'Date'[Date])

 

 

and have other measures:

 

RevenueYTDLegacy = 
//revenue from legacy ERP
TOTALYTD(SUM('Legacy_MRC_INVOICE_DETAILS'[ActAmount]), 'Date'[Date])

 

 

and 

 

RevenueYTDProd = 
//revenue from production ERP
TOTALYTD(SUM('Invoice Details'[ActAmount]), 'Date'[Date] )

 

 

My issue is that after we went live, we changed the names of some of our units so my measures calculating revenue isn't pulling data from some units in the old system because the names of our units in old system is different.

MoMrCrane_1-1725401969470.png

 

My date table is connected to both Legacy_MRC_INVOICE_DETAILS and Invoice Details. Both of the invoice tables are pointing to the production Units table 

MoMrCrane_2-1725403611617.png

 

How do I make a translation table to say, if you see AT266 in the legacy invoice table, sum up the invoices as if it is AT265-02 in production so that my BilledYTD measure will sum up invoices from both invoice tables properly per unit. As you can see there are many units we changed the name of when we went live with our production environment. 

 

1 ACCEPTED SOLUTION
v-xianjtan-msft
Community Support
Community Support

Hi @MoMrCrane 

 

You can try to create a translation table manually. Click on the Home tab and select Enter Data. In the pop-up window, enter the mapping of the old unit name to the new unit name. For example, like this:

OldUnit  NewUnit
AT266 AT265-02
OldUnit2 NewUnit2

Create a one-to-many relationship between the translation table and the Legacy_MRC_INVOICE_DETAILS table.

Then create a calculated column in the Legacy_MRC_INVOICE_DETAILS table using the following DAX:

TranslatedUnit = 
LOOKUPVALUE(
    UnitTranslation[NewUnit],
    UnitTranslation[OldUnit], 'Legacy_MRC_INVOICE_DETAILS'[Unit],
    'Legacy_MRC_INVOICE_DETAILS'[Unit] 
)

 

Best Regards,
Jarvis Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
v-xianjtan-msft
Community Support
Community Support

Hi @MoMrCrane 

 

You can try to create a translation table manually. Click on the Home tab and select Enter Data. In the pop-up window, enter the mapping of the old unit name to the new unit name. For example, like this:

OldUnit  NewUnit
AT266 AT265-02
OldUnit2 NewUnit2

Create a one-to-many relationship between the translation table and the Legacy_MRC_INVOICE_DETAILS table.

Then create a calculated column in the Legacy_MRC_INVOICE_DETAILS table using the following DAX:

TranslatedUnit = 
LOOKUPVALUE(
    UnitTranslation[NewUnit],
    UnitTranslation[OldUnit], 'Legacy_MRC_INVOICE_DETAILS'[Unit],
    'Legacy_MRC_INVOICE_DETAILS'[Unit] 
)

 

Best Regards,
Jarvis Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.