Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello everyone,
I want to create a table that summarize my database, i need to show the first day that a client made a purchase and where it was.
To find the first buy date, i used Min o date column. But i dont know how to make the "First Buy Store" . It is possible to groupby by first categoric value by the date or something like that?
Name | Date First Buy | First Buy Store |
Johny | 1/1/2018 | C |
Lucas | 3/14/2018 | B |
Brian | 2/2/2018 | A |
This is the sample database:
Name | Date | Store | Value |
Johny | 6/1/2018 | A | 12 |
Johny | 5/13/2018 | B | 10 |
Johny | 11/28/2018 | A | 85 |
Johny | 1/1/2018 | C | 34 |
Johny | 2/15/2018 | B | 56 |
Lucas | 11/25/2018 | B | 75 |
Lucas | 3/14/2018 | B | 35 |
Lucas | 9/18/2018 | C | 45 |
Lucas | 7/3/2018 | C | 56 |
Brian | 2/2/2018 | A | 84 |
Brian | 3/18/2018 | A | 68 |
Brian | 10/1/2018 | C | 11 |
Brian | 9/18/2018 | B | 12 |
Thanks
Solved! Go to Solution.
Hi @rfernandes
You can use the below measure to find the first sotre from where thr customer has purchased.
First store = var _firstdate=MIN(Table1[Date]) Return CALCULATE( FIRSTNONBLANK(Table1[Store], 1), FILTER(Table1,_firstdate))
I got below result from this measure
You can see the pbix file here.
If this helped you, please mark this post as an accepted solution and like to give KUDOS .
Regards,
Affan
Hi @rfernandes
You can use the below measure to find the first sotre from where thr customer has purchased.
First store = var _firstdate=MIN(Table1[Date]) Return CALCULATE( FIRSTNONBLANK(Table1[Store], 1), FILTER(Table1,_firstdate))
I got below result from this measure
You can see the pbix file here.
If this helped you, please mark this post as an accepted solution and like to give KUDOS .
Regards,
Affan
Thank you!!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
113 | |
98 | |
80 | |
69 | |
59 |
User | Count |
---|---|
150 | |
119 | |
104 | |
87 | |
67 |