Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
ALERT: QlikView server communication interruptions following Microsoft Windows Domain Controller security updates
cancel
Showing results for 
Search instead for 
Did you mean: 
Nagaraju_KCS
Specialist III
Specialist III

Challenge in Pivot table

Hi Team,

I have different scenario,  trying since one week but I couldn't achieve.

Experts can you please help me!

By default, pivot table is working fine,  calculation is ([Amount (USD)]*[Gross BPS])/12*0.5

but my requirement is - let say for Cashflow 5 - May2021 value is 4453  that's fine 

but my greater than month May, calculation should be ([Amount (USD)]*[Gross BPS])/12

Screen 1: default pivot table

qv_testing_0-1628964358235.png

Screen 2: below screen is my out put

qv_testing_1-1628964785924.png

Hope you understand and Thanks in Advance!

Labels (2)
1 Solution

Accepted Solutions
Kushal_Chawda

@Nagaraju_KCS  try below 

=if(Before(total Column(1))>0, 
sum(total <Client>[Amount (USD)])*sum(total <Client>[Gross BPS])/12,
sum([Amount (USD)])*sum([Gross BPS])/12*0.5)

View solution in original post

5 Replies
Kushal_Chawda

@Nagaraju_KCS  try below 

=if(Before(total Column(1))>0, 
sum(total <Client>[Amount (USD)])*sum(total <Client>[Gross BPS])/12,
sum([Amount (USD)])*sum([Gross BPS])/12*0.5)
Nagaraju_KCS
Specialist III
Specialist III
Author

Perfect 😊 - Thank you Kushal

Nagaraju_KCS
Specialist III
Specialist III
Author

Hi Kushal,

without any selection working fine, but when user selections values are not showing correct and Months not showing Jan-Dec. few of them months are missing so values mismatching.

and months also not showing all, may be if months show all values will be correct.

qv_testing_0-1629086892744.png

can you please help

 

Kushal_Chawda

@Nagaraju_KCS  I am not able to open the qvw as running personal edition. What expression are you using?

Nagaraju_KCS
Specialist III
Specialist III
Author

Same expression which you were shared 

 

If(Before(total fabs(Column(1)))>0, 
sum(total <Client>[Amount (USD)])*sum(total <Client>[Gross BPS])/12,
sum([Amount (USD)])*sum([Gross BPS])/12*0.5)

 

I have some negative data also, so I have included fabs function.

@Kushal_Chawda , can you please have a look attached original data

PFA,