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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Sanity Check and Learning (SUM+FILTER+LOOKUPVALUE)

Hi,

The below does not work, because I have multiple duplicates in my Received Report... cannot change that. (if another reason you see the below would not work please do let me know! thx).

But, I would like to check with some of the experts here if the logic is sound.

 

Target: Sum [sold units] from sale table; where the [sale date] of the sold LOT, is after the [date] that LOT is tied to in received table.

 

I have three tables in PowerBi and would like to complete the following analysis

 

Tables

Inventory Tracker (INV_LOT, TOTAL UNITS)

Sales (SALE_LOT, TOTAL UNITS, SALE_DATE)

Recevied (REC_LOT, TOTAL UNITS, REC_DATE)

Relationship 

INV_LOT = REC_LOT = SALE_LOT

DAX (does this make sense)

Total Sales = Calculate( SUM(Sales[Total_Units]),FILTER(Sales,Sales[Sale_Date]>LOOKUPVALUE(Received[Rec_Date],Received[Rec_LOT],Sales[Sale_LOT])))

1 REPLY 1
daxer-almighty
Solution Sage
Solution Sage

@Anonymous 

 

Sorry but this is not something one could easily understand (at least I can't). Asking if something makes sense is sensible only if the people you ask have some good understanding of the problem at hand. It's not clear at all, despite the info given, what the model looks like, what the relationships are and what you're really trying to achieve. You've got to be way more specific.

 

Please see this post: https://community.powerbi.com/t5/DAX-Commands-and-Tips/How-to-Get-Your-Question-Answered-Quickly/td-p/1626726

 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.