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
jyaul786
Helper II
Helper II

Previous value

Friend, 

 

how to get previous value, by date

i have table:

DateValue
01/01/20233
02/01/20235
05/02/20236
09/03/20239
Total23

 

i have dax: 

var date1=CALCULATE(MAX(table[date]),table[date]<MAX(table[date]))
return
CALCULATE(sum(table[value]),table[date]=date1)
but its give the result:
DateValuePrevious Day value
01/01/20233 
02/01/202353
05/02/202365
09/03/202396
Total236
 
but i would like to get the result like table below and sum of previous value at last:
DateValuePrevious Day value
01/01/20233 
02/01/202353
05/02/202365
09/03/202396
Total2314
 how can i achieve above using dax.
1 ACCEPTED SOLUTION
Ahmedx
Super User
Super User

write another measure like this

 

Previous Day value fixed = 
       SUMX(VALUES(Date[Date]), [Previous Day value])

 

View solution in original post

1 REPLY 1
Ahmedx
Super User
Super User

write another measure like this

 

Previous Day value fixed = 
       SUMX(VALUES(Date[Date]), [Previous Day value])

 

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.