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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

AugPowerBI_Carousel

Power BI Monthly Update - August 2024

Check out the August 2024 Power BI update to learn about new features.

August Carousel

Fabric Community Update - August 2024

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