Forum Discussion
Creating new Date Column or Measure based on certain values
- Anonymous3 years ago
Hi PowerBIUser3492 ,
Please try:
Orginal Purchase Date = CALCULATE ( MIN ( 'Table'[Date] ), FILTER ( ALL ( 'Table' ), 'Table'[Type] = "Purchase" && 'Table'[ID] = EARLIER ( 'Table'[ID] ) ) )Most Recent Purchase Date = CALCULATE ( MAX ( 'Table'[Date] ), FILTER ( ALL ( 'Table' ), 'Table'[Type] = "Purchase" && 'Table'[Date] <= EARLIER ( 'Table'[Date] ) ) )//I would post my excel file, but this window will not let me attach files...
You can link to a cloud file. Make sure the file doesn't contain any sensitive data before you make it public.
How to provide sample data in the Power BI Forum
Best Regards,
Gao
Community Support TeamIf there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data in the Power BI Forum
Hi PowerBIUser3492 ,
Please try:
Orginal Purchase Date =
CALCULATE (
MIN ( 'Table'[Date] ),
FILTER (
ALL ( 'Table' ),
'Table'[Type] = "Purchase"
&& 'Table'[ID] = EARLIER ( 'Table'[ID] )
)
)Most Recent Purchase Date =
CALCULATE (
MAX ( 'Table'[Date] ),
FILTER (
ALL ( 'Table' ),
'Table'[Type] = "Purchase"
&& 'Table'[Date] <= EARLIER ( 'Table'[Date] )
)
)
//I would post my excel file, but this window will not let me attach files...
You can link to a cloud file. Make sure the file doesn't contain any sensitive data before you make it public.
How to provide sample data in the Power BI Forum
Best Regards,
Gao
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data in the Power BI Forum