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

Measure calculation not coming correct

HI All,

I have a simple data set

DateSales
21-02-201910
22-02-201910
23-02-201910
24-02-201910

 

creted a measure to calculated the max date

max_date = MAX(Sheet1[Date]) i.e 24-02-2019
now when I am summing up the sales for max date I am getting 40 instead of 10 on that date
sale_sum = CALCULATE(sum(Sheet1[Sales]),FILTER(Sheet1,Sheet1[Date]=[max_date])) (however if i hard code "24-02-2019" I am getting 10)Annotation 2019-02-21 002822.jpg
1 ACCEPTED SOLUTION
Anonymous
Not applicable

Try this measure:

 

sale_sum = CALCULATE(sum(Sheet1[Sales]),FILTER(Sheet1,Sheet1[Date]=MAX( Sheet1[Date]) ) )

 

Thanks

Raj

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Try this measure:

 

sale_sum = CALCULATE(sum(Sheet1[Sales]),FILTER(Sheet1,Sheet1[Date]=MAX( Sheet1[Date]) ) )

 

Thanks

Raj

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.