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
Anonymous
Not applicable

Last Sale Date by Sku

Hi! I am fairly new to Power BI and need help finding the last sale date of a sku. 

I've tried with the following:

Date = CALCULATE(max(SOP30200_SalesHeader[DOCDATE]),ALLSELECTED(IV00101_ItemMaster[ITEMNMBR]))
but this brings back the last date of sale as yesterday for everything (the last time refreshed).
 
Can someone point me in the right direction? This will help me for other reports I'm building as well.
 
Thank you in advance! 
Steph
 
4 REPLIES 4
amitchandak
Super User
Super User

@Anonymous ,Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

 

Try a measure like

Date = CALCULATE(max(SOP30200_SalesHeader[DOCDATE]),filter(ALLSELECTED(IV00101_ItemMaster),IV00101_ItemMaster[ITEMNMBR] = max(IV00101_ItemMaster[ITEMNMBR])))

Anonymous
Not applicable

shilburn_0-1611769153909.png

 

Anonymous
Not applicable

Sales Date is in the header table and item number is in the detail table. 

@Anonymous , If the formula i shared not working then; Can you share sample data and sample output in a table format? Or a sample pbix after removing sensitive data.

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.

Top Solution Authors