Forum Discussion
Previous duration record
- 6 years ago
Hi,
This calculated column works fine
=LOOKUPVALUE('Duration'[Duration],'Duration'[Date],CALCULATE(MAX('Duration'[Date]),FILTER('Duration','Duration'[Brand]=EARLIER('Duration'[Brand])&&'Duration'[Date]<EARLIER('Duration'[Date]))),'Duration'[Brand],'Duration'[Brand])Hope this helps.
Hi,
This calculated column formula works
=LOOKUPVALUE(Data[DurationinMinutes],Data[Date],CALCULATE(MAX(Data[Date]),FILTER(Data,Data[Brand]=EARLIER(Data[Brand])&&Data[Date]<EARLIER(Data[Date]))),Data[Brand],Data[Brand])
Hope this helps.
- elouizi6 years ago
Helper II
Looks amazing. Is there a way I can use it as a messaure? Because I need to do other calculations, otherwise I need to create a lot of columns (which will impact the performance)
- Ashish_Mathur6 years ago
Super User
Whom are you replying to? Did my calculated column formula work?
- elouizi6 years ago
Helper II
Hi Ashish_Mathur,
My replay was to you. :).
I dont know why, but it says that it cannot find the column "brand" and the "date" columns.
Is there another way I can solve this without creating a colum? Otherwise I may need to create lots of other columnsThanks!
- Ashish_Mathur6 years ago
Super User
Hi,
Share the link from where i can download your PBI file.
- elouizi6 years ago
Helper II
Hi Ashish,
Please find the links below:
data file (Excel and pbix file)
https://mega.nz/file/9aYRBIRa#IO2OJ9T9xOo63BGMMjbKBxPGYZ78xwMNkhsPboBdBAY
https://mega.nz/file/lOJnQSaZ#GKScuWtFwcFh6-N-AhBz-mnP9buWpi60LHH4RstEVMQ
Many Thanks!