Forum Discussion
CountRows and Divide
- 7 years ago
Hi Anonymous
mwegener's solution may be helpful if you want to create a table visual like that.
Why you use a measure using CountRows doesn't work is that as a measure it calculate the current row instead of the filter content. you need to use "calculate" function to change the filter content for "countrows".
If you'd like the "count" or "countrows" to use in your Table 1 - Employee to calculate the count the number of employees for each department
Please create measures like
each department = CALCULATE(COUNT(Employee[EmployeeID]),ALLEXCEPT(Employee,Employee[Department]))
If you want divide BilledHours in Table2 for each EmployeeID by the number of employees per department, please create measures below
sum per id = SUM(TimeEntry[BilledHours]) divide1 = SUM(TimeEntry[BilledHours])/[each department]
If you want divide BilledHours in Table2 for each department by the number of employees per department, please create measures below
sum per depart = CALCULATE(SUM(TimeEntry[BilledHours]),ALLEXCEPT(Employee,Employee[Department])) divide2 = [sum per depart]/[each department]
Best Regards
Maggie
Anonymous Publish an example with some sample data of what you want and you'll get an answer in no time.