Forum Discussion
Minimum Purchase Date for a Customer
- 3 years ago
Hi,
Create a calculated column in your Customer Dimension as below:
CALCULATE (
MIN ( 'Date Table'[DateColumn] ),
RELATEDTABLE ( 'Pucrchase Fact Table' )
)Then your problem would be solved.
Best Regards.
Thank you! They all are in a combined table. Should I create a date table which will make it easier ?
Yes it is better to make a separate dimension for that.
But If you don't want to create a dimension you can create a measure as below just based on your combined table:
VAR _CUSTOMER =
SELECTEDVALUE ( CustomerPurchaseFactTable[CustomerID] )
RETURN
CALCULATE (
MIN ( CustomerPurchaseFactTable[MonthYear] ),
FILTER (
ALL ( CustomerPurchaseFactTable ),
CustomerPurchaseFactTable[CustomerId] = _CUSTOMER
)
)
Regards,
Loran