Forum Discussion
Dsitribute time spent based on categories
So I have a table that is structured as follows :
| Customer | Category | Time | Summary |
| Cust A | Cat1 | 3 | Something |
| Cust B | Cat2 | 1 | Something |
| Cust A | Cat 2 | 2 | Something |
| All Cust | Cat1 | 2 | Something |
Basically I have a new line each time I do a task for one of my customers (how long I've been on it and in which category it belongs).
When I do a task that benefits all my customer (ie : internal training etc) I give it the customer name of "ALL Cust" and specify a category.
What I need is, when visualising my data in anytype of visualization that implies the time spent per categories, that this "All customer time" to be evenly distributed amongs all other customer based on the category ...
Do you guys have any idea if it's possible to do that DAX ? I've thought about using the FILTER function but couldn't find anything ...
3 Replies
- v-frfei-msft
Community Support
Hi Anonymous ,
We can get the time spent per categories by the following measure.
Measure = CALCULATE(SUM(Table1[Time]),ALL(Table1),VALUES(Table1[Category]))
Please check the pbix as attached. If I misunderstand you, please share your excepted result to me.
Regards,
Frank
- AnonymousNot applicable
Hi, So it isn't exactly what I need, what I want is for the "All Cust" time to be distributed to the SUM of time of EACH other customer based on the category so that at the end I have something like this :
All Cust Cat1 Time = 2
ALL CustA Cat1 time = 3+((All Cust Cat1 Time)/(Number Of Cust)) which here = 3+1 = 4
ALL CustB Cat1 time = 0+((All Cust Cat1 Time)/(Number Of Cust)) which here = 0+1 = 1
ALL CustB Cat2 time = 1+((All Cust Cat2 Time)/(Number Of Cust)) which here = 1+0 = 0- AnonymousNot applicable
Still searching for a way to do it ... I've found a way to sum it and distribute it WITHOUT keeping the category or to sum the category but WITHOUT being able to distribute it ...