I am using Power BI (I can use only DAX).
Starting from this table:
| Client | Purchase Date |
|---|---|
| ClientA | 01/01/2023 |
| ClientA | 01/02/2023 |
| ClientB | 01/03/2023 |
| ClientB | 01/02/2023 |
I would like to create a new column, called First Purchase Date that, for each client, keeps first purchase date, like:
| Client | Purchase Date | First Purchase Date |
|---|---|---|
| Client A | 01/01/2023 | 01/01/2023 |
| Client A | 01/02/2023 | 01/01/2023 |
| Client B | 01/03/2023 | 01/02/2023 |
| Client B | 01/02/2023 | 01/02/2023 |
How can I solve it using only DAX?
I tried to create
First Purchase Date = MINX(VALUES(Table1[Client]),MIN(Table2[Purchase Date]))
But it's like Third column is equal to second:
| Client | Purchase Date | First Purchase Date |
|---|---|---|
| Client A | 01/01/2023 | 01/01/2023 |
| Client A | 01/02/2023 | 01/02/2023 |
| Client B | 01/03/2023 | 01/03/2023 |
| Client B | 01/02/2023 | 01/02/2023 |
REMOVEFILTERSto remove the row context.Try: