Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello. I am having trouble calculating the % part churn by a dimension. I have an example data set included.
The part churn is calculated by =Count(Part)/Sum(Total_Part_Count). I am able to graph by manager using =Count(Part)/Aggr(Total_Part_Count, Key) but as soon as I select a Manager the denominator is obviously null.
Is there a way that when I filter to a manager I can still get the Total_Part_Count for the key? I have tried several ways with Set Analysis but nothing has worked. Any help would be great. Thank you.
Part | Manager | Key | Total_Part_Count |
---|---|---|---|
Part 1 | Joe | 1A | |
Part 2 | Joe | 1A | |
Part 3 | Bill | 2B | |
Part 4 | Bill | 2B | |
Part 5 | Ted | 3C | |
1A | 5 | ||
2B | 10 | ||
3C | 1 |
you may use set Analysis to desekect Manager
like this
Count({<Manager=>}Part)
the part {<Manager=>} must be placed in every calculation - Count, sum
Are you sure you want to do a concatenate here? To me you will be better off doing a Left Join (or Join)
Table:
LOAD Part,
Manager,
Key
FROM xyz;
Join(Table)
LOAD Key,
Total_Part_Count
FROM abc;
Best,
Sunny
I tried both suggestions to either join the data or use set analysis but could not get either to work. Any time I filter to a manager I lose the total_parts in the denominator. Any other suggestions?
I have included the qvw for assistance.
Have a look with join. (PFA)
Best,
Sunny
It looks like it is working. The only difference that I had done was an inner join. Thank you!
Inner join should have also worked, not sure why that did not work for you.
Best,
Sunny