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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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