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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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

Top Solution Authors