cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
shilburn
Frequent Visitor

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 IV
Super User IV

@shilburn ,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])))



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

shilburn_0-1611769153909.png

 

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

@shilburn , 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.



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

Helpful resources

Announcements
PBI User Groups

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are You Ready?

Test your skills now with the Cloud Skills Challenge.

Top Solution Authors