March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
hi,
first sorry for my rough english
i have a dim table with clients, like this:
id | name | last name |
1 | jon | doe |
2 | jane | deo |
in my fact table i have purchase by those clients:
Client_id | date | item |
1 | 24/12/2022 | a1 |
2 | 25/12/2022 | a2 |
1 | 26/12/2022 | a3 |
2 | 27/12/2022 | a4 |
what i need is a new column in the dim table with the least purchase date for each client, for example:
id | name | last name | least purchase date |
1 | jon | doe | 26/12/2022 |
2 | jane | deo | 27/12/2022 |
i cant find the correct functions to do this so i really apriciate your help, thanks!
Solved! Go to Solution.
Hi @amontenegro93 ,
For the last/ latest purchase date for each customer:
Create a measure using the following DAX:
Hi,
To your Table visual, drag the fields from the client Table. Write this measure and format it as a Date
Last date = max(Fact[Date])
Hope this helps.
Hi @amontenegro93 ,
For the last/ latest purchase date for each customer:
Create a measure using the following DAX:
it works, thank you!
User | Count |
---|---|
117 | |
77 | |
58 | |
52 | |
46 |
User | Count |
---|---|
171 | |
117 | |
63 | |
57 | |
51 |