Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
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 @Anonymous
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 measureFirst Store
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 @Anonymous
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 measureFirst Store
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!!
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.