Forum Discussion
Anonymous
6 years agoNot applicable
Count rows from another table
Hi, I have two tables: AllGroups - with the list of Group titles (62 rows) and SummaryAboutGroups - with execution dates of those groups (1799 rows): I need to get this answer: how many grou...
- 6 years ago
Hi Anonymous ,
We can use the following steps to meet your requirement.
1. In Power Query Editor, we need to add a date column and a week column.
2. Create three measures.
Today number of Group = var _today = TODAY() return CALCULATE(COUNT('Table'[Group]),FILTER('Table','Table'[Date]=_today))This week number of Group = var _thisweek = WEEKNUM(TODAY(),2) return CALCULATE(COUNT('Table'[Group]),FILTER('Table','Table'[Week of Year]=_thisweek))Last week number of Group = var _lastweek = WEEKNUM(TODAY(),2)-1 return CALCULATE(COUNT('Table'[Group]),FILTER('Table','Table'[Week of Year]=_lastweek))If it doesn’t meet your requirement, could you please show the exact expected result based on the table that you have shared?
Best regards,
Community Support Team _ zhenbw
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
BTW, pbix as attached.
Mariusz
6 years agoCommunity Champion
Hi Anonymous
You can create a Measure for each time frame using DAX Time inteligence functions, please refer to the below.
https://docs.microsoft.com/en-us/dax/time-intelligence-functions-dax
Best Regards,
Mariusz
If this post helps, then please consider Accepting it as the solution.
Please feel free to connect with me.
LinkedIn
Mariusz
If this post helps, then please consider Accepting it as the solution.
Please feel free to connect with me.