Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
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 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 @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 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!!
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
147 | |
85 | |
66 | |
52 | |
46 |
User | Count |
---|---|
215 | |
90 | |
83 | |
66 | |
58 |