Forum Discussion
Need to display second row data into first row using DAX Expression
- 5 years ago
Hi,
I am not sure of where my suggestion will plug into your existing table function, but on a physical input table, this calculated column formula should get you your desired result
=calculate(min(data[date]),filter(data,data[name]=earlier(data[name])&&data[date]>earlier(data[date])))
Hope this helps.
Anonymous use the following expression to add a new column:
Next Date =
VAR __table = ALLEXCEPT ( 'Next', Next[Name] )
VAR __version = CALCULATE ( MAX ( Next[Version] ) )
VAR __nextDate =
CALCULATE (
MIN ( Next[Date] ),
__table,
Next[Version] > __version
)
RETURN __nextDate
Check my latest blog post Compare Budgeted Scenarios vs. Actuals I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!
⚡Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.⚡
parry2k , Getting Dependency Error and create new date column and implemented the above logic still getting same error, Ashish_Mathur solution is working as expected, Only concern is poerformace on larger dataset how it will work because using comparison in filter condition, which one is good new coloumn or measure option