Forum Discussion
ginalu
1 year agoHelper I
Issue with Missing data in Calculation
Some lessons are included while others are missing in the calculation. Example of Missing Lesson in Calculation For example, a user conducted a lesson on 10/16. Since today is 10/21, the les...
Anonymous
1 year agoNot applicable
Hi,MNedix, sanalytics and Kedar_Pande .
thanks for your concern about this issue.
Your answer is excellent!
And I would like to share some additional solutions below.
Hello,ginalu .I am glad to help you.
Here is my test.
I noticed that you have a one-to-many relationship between your two tables, try using the RELATED function in the filter function on a field in the other table
like this.
Calculate the number of users who have been active in the last seven days.
Recent7DaysActiveUsers =
CALCULATE(
DISTINCTCOUNT(USERUNQ[user_id]),
FILTER(
LESSONN,
TRUNC(LESSONN[start_time]) >= TODAY() - 7 &&
TRUNC(LESSONN[start_time]) < TODAY() &&
RELATED(USERUNQ[user_id]) = LESSONN[teacher_id]
)
)
Below is my test data:
I hope my suggestions give you good ideas, if you have any more questions, please clarify in a follow-up reply.
Best Regards,
Carson Jian,
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.