Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!
Hello all,
I hope you are doing well.
I have this kind of Data below :
| activityid | ActivityCreatat | WeekNbr(ActivityCreat) | user id | UserCreatAt | WeekNbr(UserCreat) |
| id1 | 04/01/2021 | 1 | id1 | 08/01/2021 | 1 |
| id2 | 05/01/2021 | 1 | id2 | 01/01/2021 | 53 |
| id3 | 10/01/2021 | 1 | id1 | 08/01/2021 | 1 |
| id4 | 11/01/2021 | 2 | id1 | 08/01/2021 | 1 |
| id5 | 12/01/2021 | 2 | id3 | 21/01/2021 | 3 |
| id6 | 18/01/2021 | 3 | id1 | 08/01/2021 | 1 |
| id7 | 19/01/2021 | 3 | id4 | 13/01/2021 | 2 |
| id8 | 20/01/2021 | 3 | id1 | 08/01/2021 | 1 |
| id9 | 21/01/2021 | 3 | id3 | 21/01/2021 | 3 |
| id10 | 22/01/2021 | 3 | id5 | 14/01/2021 | 2 |
| id11 | 23/01/2021 | 3 | id2 | 01/01/2021 | 53 |
| id12 | 24/01/2021 | 3 | id5 | 14/01/2021 | 2 |
| id13 | 25/01/2021 | 3 | id4 | 13/01/2021 | 2 |
And I want add a new column that calculate the number of activities maked by new user during the week of creation :
| activityid | ActivityCreatat | WeekNbr(ActivityCreat) | user id | UserCreatAt | WeekNbr(UserCreat) | Nbr Activities maked by new user during the week of creation |
| id1 | 04/01/2021 | 1 | id1 | 08/01/2021 | 1 | 2 activities (id1 and id3) |
| id2 | 05/01/2021 | 1 | id2 | 01/01/2021 | 53 | 0 |
| id3 | 10/01/2021 | 1 | id1 | 08/01/2021 | 1 | 2 activities (id1 and id3) |
| id4 | 11/01/2021 | 2 | id1 | 08/01/2021 | 1 | 2 activities (id1 and id3) |
| id5 | 12/01/2021 | 2 | id3 | 21/01/2021 | 3 | 1 activity (id9) |
| id6 | 18/01/2021 | 3 | id1 | 08/01/2021 | 1 | 2 activities (id1 and id3) |
| id7 | 19/01/2021 | 3 | id4 | 13/01/2021 | 2 | 0 activity (during the week UserCreat) |
| id8 | 20/01/2021 | 3 | id1 | 08/01/2021 | 1 | 2 activities (id1 and id3) |
| id9 | 21/01/2021 | 3 | id3 | 21/01/2021 | 3 | 1 activity (id9) |
| id10 | 22/01/2021 | 3 | id5 | 14/01/2021 | 2 | 0 |
| id11 | 23/01/2021 | 3 | id2 | 01/01/2021 | 53 | 0 |
| id12 | 24/01/2021 | 3 | id5 | 14/01/2021 | 2 | 0 |
| id13 | 25/01/2021 | 3 | id4 | 13/01/2021 | 2 | 0 activity (during the week UserCreat) |
Thank you for your help.
Best,
Solved! Go to Solution.
@Anonymous,
Try this calculated column:
Nbr Activities Made =
VAR vUser = Table1[user id]
VAR vTable =
FILTER (
Table1,
Table1[user id] = vUser
&& YEAR ( Table1[UserCreatAt] ) = YEAR ( Table1[ActivityCreatat] )
&& Table1[WeekNbr(UserCreat)] = Table1[WeekNbr(ActivityCreat)]
)
VAR vResult =
COUNTROWS ( vTable )
RETURN
vResult
Result (m/d/yy format):
Proud to be a Super User!
@Anonymous,
Try this calculated column:
Nbr Activities Made =
VAR vUser = Table1[user id]
VAR vTable =
FILTER (
Table1,
Table1[user id] = vUser
&& YEAR ( Table1[UserCreatAt] ) = YEAR ( Table1[ActivityCreatat] )
&& Table1[WeekNbr(UserCreat)] = Table1[WeekNbr(ActivityCreat)]
)
VAR vResult =
COUNTROWS ( vTable )
RETURN
vResult
Result (m/d/yy format):
Proud to be a Super User!
| User | Count |
|---|---|
| 49 | |
| 37 | |
| 33 | |
| 22 | |
| 18 |
| User | Count |
|---|---|
| 130 | |
| 100 | |
| 56 | |
| 37 | |
| 37 |