Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
userid128223
Creator
Creator

partial sum on pivot table how

i have set analysis like below. i need to do 2 things.

Sum({$<BILLABLE = {'T'}, ServiceDate = {'>=$(=ADDMONTHS(TODAY(),-18))'}>}HoursWorked)

data

company     SalesRepName     ProjectName  ServiceDate   HourswWorked     Billable(T/F)    

1) I have pivot table that does sum at company level. I want to do it at company + at project level. How do I do?

2) Can the above setanlayis be converted to formula so that I can use it during script execution

1 Solution

Accepted Solutions
Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

1. Add Project as a Dimension and requst "Partial Sums" at the Presentation table.

2. Set Analysis by itself can't be used in the script, but it's fairly simple to present it in an IF statement:

if (BILLABLE = 'T' and ServiceDate >= ADDMONTHS(TODAY(),-18), HoursWorked, 0) as BillableHours

assuming that all three fields BILLABLE, ServiceDate and HoursWorked reside in the same table. If they don't, you'll need to use mapping to grab the corresponding values from the dimensional tables.

cheers,

Oleg

View solution in original post

3 Replies
Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

1. Add Project as a Dimension and requst "Partial Sums" at the Presentation table.

2. Set Analysis by itself can't be used in the script, but it's fairly simple to present it in an IF statement:

if (BILLABLE = 'T' and ServiceDate >= ADDMONTHS(TODAY(),-18), HoursWorked, 0) as BillableHours

assuming that all three fields BILLABLE, ServiceDate and HoursWorked reside in the same table. If they don't, you'll need to use mapping to grab the corresponding values from the dimensional tables.

cheers,

Oleg

userid128223
Creator
Creator
Author

This is not working and it could be because assuming that all three fields BILLABLE, ServiceDate and HoursWorked are not in same table. they are in 2 different table.

Does that make a difference and why, can you please explain.

If i have 2 tables how do I map.

1 table has -> 5 fields

2 table has -> 3 fields

with Company name key in common.

userid128223
Creator
Creator
Author

i cannot get it to display partial sum by project.