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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
AlfredGulyas
New Member

Need to create a table/visual from two tables filtering the second table

I have 2 tables, DailyStock is storing data for every day with the ItemID and with the ActualDate column. The other table ItemMast has the ItemID, the Price and the LastRevisionDate columns. For one item belong multiple revision dates with the corresponding prices so the LOOKUPVALUE gives me always multiple results (not a single Price).

I'd like to create a visual or a table where I can select any date with a slicer (which is done) and will show me the actual price for that date.

I tried some ways where the actual date > latest revison date but no luck.

 

Obviously I'm a beginner in the Power BI...

2 ACCEPTED SOLUTIONS

I created a data table and create a masure

Measure = if(maxx(FILTER(all(ItemMast),'ItemMast'[Last Revsion Date]<=max('date'[Date])),ItemMast[Last Revsion Date])=max('ItemMast'[Last Revsion Date]),1)
 
add this measure to table visual and set to 1
 
11.PNG
 
pls see the attachment below




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

measure has been added to the table visual, so it works on that  visual and means filtering the itemmast table.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

6 REPLIES 6
AlfredGulyas
New Member

DailyStock (contains the stock data for every day of the year)

ItemIdQtyActualDate
100011011/20/2024
10002511/20/2024
100031511/20/2024
100048011/20/2024
100055011/20/2024
1000621511/20/2024
10007611/20/2024
100085611/20/2024
10001511/29/2024
10002311/29/2024
100031511/29/2024
100042611/29/2024
100054211/29/2024
1000615211/29/2024
10007511/29/2024
100085511/29/2024

 

ItemMast (contains the details for the Items with every revisions, different items have different revision dates)

ItemIdPriceVendor IDLast Revsion Date
1000110.25800011/15/2024
1000110.88800013/2/2024
1000112.12800029/4/2024
1000112.258000211/28/2024

 

Selected date: 11/20/2024 and the expected result (only for item 10001):

ItemIDPriceVendor ID
1000112.1280002

 

 

I created a data table and create a masure

Measure = if(maxx(FILTER(all(ItemMast),'ItemMast'[Last Revsion Date]<=max('date'[Date])),ItemMast[Last Revsion Date])=max('ItemMast'[Last Revsion Date]),1)
 
add this measure to table visual and set to 1
 
11.PNG
 
pls see the attachment below




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Looks like magic to me and works. Thank you very much!

 

So basically this "empty" measure just filtering out the whole table?

measure has been added to the table visual, so it works on that  visual and means filtering the itemmast table.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




ryan_mayu
Super User
Super User

could you pls proivde some sample data and expected output?





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Please see it above

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

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.

Top Solution Authors
Top Kudoed Authors