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
mangesh
Frequent Visitor

Calculate Converted Value Measure using SUMX from different tables

Hello, I am a Power BI beginner and this forum has been extremely helpful in guiding me in the right direction when I get stuck. I have just started learning DAX and have managed to create simple formulas. However I am now stuck and not able to figue out how to proceed. Any guidance will be appreciated.

 

Problem:

Below is the relationship diagram of my data model.  Historical data is static and not refreshed. Monthly sales is added to new table and refreshed daily. I have a conversion factor for every month for every item code in my yield master. To arrive at sales value, I need to multiply the quantity for each item (available in invoice data table on daily basis) by its conversion factor for that particular month and then aggregate at various levels. I understand that SUMX is the way to go but since the data is in different tables and i need to iterate multiplication at variouls levels I have no clue how to proceed. 

 

The formula logic is:

Value = Sum of (quantity against every item code for a month*conversion factor from item master for that month)

 

Data Model.pngInvoice Data Sample.pngItem Master Sample.png

2 REPLIES 2
v-jiascu-msft
Employee
Employee

Hi @mangesh,

 

Try the following formula please. If it doesn't help, please provide a dummy sample.

Measure =
SUMX (
    'Feb 2018 Invoice Data',
    [Quantity] * RELATED ( 'Tbl_ItemMaster'[Converted Reporting Factor] )
)

Best Regards,

Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thanks @v-jiascu-msft for replying. The conversion factor is in Yield Master which is connected to Feb Invoice Table via Item Master Table. There is no direct connection between Yield Master and Invoice data. So the formula didnt work. Attaching the data model again.

 

Formula Logic: Yield Total Value = Sum of ( Item Quantity (from Invoice table)*Yield Non-Conv Vol (from Yield Master Table) )

 

Data Model.png

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.