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.
New to Dax and I am trying to work out the first purchase date for each product, I have three tables:
Customer |
Customer A |
Customer B |
Customer C |
Product |
Product A |
Product B |
Product C |
Calendar |
June-20 |
May-20 |
Apr-20 |
Ideally, I'd like to see the data presented something like this:
Customer | Product | Date |
Customer A | Product A | Apr-20 |
Customer A | Product B | Apr-20 |
Customer A | Product C | May-20 |
Solved! Go to Solution.
HI @av9 ,
Suppose this is your Order Table.
You can use the following measure
Regards,
Harsh Nathani
Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)
Is there an 'Orders' table?
If not, you'll have to provide more details about the tables you have and any relationships.
Yes there is an orders table that contains the daily data , i.e.
Customer | Date | Product |
Customer A | 30/04/2020 | Product A |
Ok, good, what have you tried so far?
Tried using MIN to get the first date a purchase appears for a Customer :
HI @av9 ,
Suppose this is your Order Table.
You can use the following measure
Regards,
Harsh Nathani
Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)
Can't we simplify the measure ? the visualisation will provide the context.
If we want powerbi to do the work, let's try dragging the date on to the visual and , in the Values well, click the dropdown on date and choose the appropriate aggregation (not Do Not Summarize)
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 |
---|---|
115 | |
99 | |
88 | |
70 | |
62 |
User | Count |
---|---|
151 | |
120 | |
103 | |
87 | |
68 |