Forum Discussion
arhomberg
Helper I
3 years agoCalculated 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
Resident Rockstar
3 years agoarhomberg - 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 ago
Helper I
Awesome, thanks ChrisMendoza!