Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I need to show new task added, by month selection of month. i.e (refer below table.) below are allotted headcount list for respective task. On Jan Month Task 3 newly added, Feb month Task 4, May Month Task 1 & 2
when selecting Month Jan my Pivot table should show Only Task 3, if selection is May month it should be Task 1 & 2
Task | Dec-19 | Jan-20 | Feb-20 | Mar-20 | Apr-20 | May-20 | Jun-20 | Jul-20 | Aug-20 | Sep-20 |
Task 1 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 3.00 | 3.00 | 3.00 | 3.00 | 3.00 |
Task 2 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 6.00 | 6.00 | 6.00 | 6.00 | 6.00 |
Task 3 | 0.00 | 7.00 | 7.00 | 7.00 | 7.00 | 7.00 | 7.00 | 7.00 | 7.00 | 7.00 |
Task 4 | 0.00 | 0.00 | 3.00 | 3.00 | 3.00 | 3.00 | 3.00 | 3.00 | 3.00 | 3.00 |
Task 5 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 4.00 | 4.00 |
I used formula - if(sum({<Months ={$(=Max(Months))}>}Headcount) >'0.00' and sum({<Months ={$(=Max(Months)-1)}>}Headcount)='0.00', sum(Headcount),0) then I used 'suppress null' option. but all values shows zero and no task displayed. can somebody help me to rewrite formula
HI @Saro_2306
Try like below
Temp:
CrossTable(Month, TaskCount)
LOAD * INLINE [
Task, Dec-19, Jan-20, Feb-20, Mar-20, Apr-20, May-20, Jun-20, Jul-20, Aug-20, Sep-20
Task 1, 0, 0, 0, 0, 0, 3, 3, 3, 3, 3
Task 2, 0, 0, 0, 0, 0, 6, 6, 6, 6, 6
Task 3, 0, 7, 7, 7, 7, 7, 7, 7, 7, 7
Task 4, 0, 0, 3, 3, 3, 3, 3, 3, 3, 3
Task 5, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4
];
Final:
Load *, If(Previous(TaskCount)=0 and TaskCount > 0, 1, 0) as Flag Resident Temp
order by Task;
DROP Table Temp;
Dim: Task & Month
Exp: Sum({<Flag={1}>}TaskCount)
O/P:
HI @Saro_2306
Try like below
Temp:
CrossTable(Month, TaskCount)
LOAD * INLINE [
Task, Dec-19, Jan-20, Feb-20, Mar-20, Apr-20, May-20, Jun-20, Jul-20, Aug-20, Sep-20
Task 1, 0, 0, 0, 0, 0, 3, 3, 3, 3, 3
Task 2, 0, 0, 0, 0, 0, 6, 6, 6, 6, 6
Task 3, 0, 7, 7, 7, 7, 7, 7, 7, 7, 7
Task 4, 0, 0, 3, 3, 3, 3, 3, 3, 3, 3
Task 5, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4
];
Final:
Load *, If(Previous(TaskCount)=0 and TaskCount > 0, 1, 0) as Flag Resident Temp
order by Task;
DROP Table Temp;
Dim: Task & Month
Exp: Sum({<Flag={1}>}TaskCount)
O/P:
Thanks a lot. It working fine.