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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
Jtbonner1986
Helper I
Helper I

Summarising and Joining Data in Multiple Tables

Hi All, 

 

I am trying to join and summarise data from multiple tables. 

 

Currently i have the below DAX to create my summary table, however, i also want to be able to add the LAST mateiral desc from a seperate table. 

 

Table =
var combineTable = ADDCOLUMNS(LineOfBalance,
                    "PLN", CALCULATE(SUM('BomPur'[ Outstanding]), 'BomPur' [Status] = "PLN"),
                    "REQ", CALCULATE(SUM('BomPur'[ Outstanding]), 'BomPur' [Status] = "REQ"),
return
SUMMARIZE(combineTable,LineOfBalance[Material], [PLN], [REQ] )

 

The [Material Desc] belongs in the 'BOM' table. However, this table can table can have multiple values of [Material Desc] and multiple rows for [Material] exist in the table 

 

I would like to select the last [Material Desc] by [PurchDate] and add it to the query. 

 

Any help?

2 REPLIES 2
amitchandak
Super User
Super User

@Jtbonner1986 , One way take lastnonblank or use lastnonblankvalue

 

SUMMARIZE(combineTable,LineOfBalance[Material], "Desc", lastnonblank(LineOfBalance[Material]) , [PLN], [REQ] )

 

 

 

SUMMARIZE(combineTable,LineOfBalance[Material], "Desc", lastnonblankvalue (LineOfBalance[Date], LineOfBalance[Material]) , [PLN], [REQ] )

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

The [Material Desc] is not in the 'line of balance table' but it is in the 'BOM' table. which has no relationship

Helpful resources

Announcements
June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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