Forum Discussion
arhomberg
3 years agoHelper I
Calculated Column with Date Limits
Hello all, I am attempting to create a calculated column that does a distinct count within another table. I have a subscriptions table that holds a customer id and a start and end date. There is ...
- 3 years ago
I was able to solve this with the following:
- 3 years ago
arhomberg - This seems to work:
Column = SUMMARIZE ( FILTER ( Usage, Usage[customer_id] = Subscriptions[customer_id] && Usage[date] >= Subscriptions[start_date] && Usage[date] <= Subscriptions[end_date] ), "@", DISTINCTCOUNT ( Usage[user_id] ) )
ChrisMendoza
3 years agoResident Rockstar
arhomberg - This seems to work:
Column =
SUMMARIZE (
FILTER (
Usage,
Usage[customer_id] = Subscriptions[customer_id]
&& Usage[date] >= Subscriptions[start_date]
&& Usage[date] <= Subscriptions[end_date]
),
"@", DISTINCTCOUNT ( Usage[user_id] )
)
- arhomberg3 years agoHelper I
Awesome, thanks ChrisMendoza!