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
islam_zaki
Regular Visitor

fillter result by date for lastdate

Hi All 

 

I need to get only the last sales date as one date, now this DAX :

 

LastDate NetSales = CALCULATE([Sales ExVAT/ExCHARITY],LASTDATE(SALESTRANSACTION[SALES DATE]))

 

Giving the last date of each store, may this date have no sales for some stores. 

 

example : 

islam_zaki_0-1619787776975.png

 

 

Thanks in Advance...

2 REPLIES 2
amitchandak
Super User
Super User

@islam_zaki , You have to try something like


Measure =
VAR __id = MAX ('Table'[Store] )
VAR __date = CALCULATE ( MAX('Table'[Date] ), ALLSELECTED ('Table' ), 'Table'[Store] = __id )
CALCULATE ( sum ('Table'[sales] ), VALUES ('Table'[Store] ),'Table'[Store] = __id,'Table'[Date] = __date )

 

@amitchandak Thanks for supporting, 

i try the above measure but its fail as below : 

islam_zaki_0-1619819570129.png

 

 

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