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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

division with two if statement

Hi everyone,

The calculation in my pivot table is actually off.

I am trying to divide this expression, numerator: =IF(TODAY()>[Opp Exp Decision Date], ([Local Member Firm Fees]*[Opp Probability]/100)/295*0.5,[Local Member Firm Fees]*[Opp Probability]/100/295)

with denominator: =IF(((([Opp Est Eng End Date]-[Opp Est Eng Start Date])/30)=0),1,([Opp Est Eng End Date]-[Opp Est Eng Start Date])/30)

the two expressions alone generate the correct values, but not when I link them in division with this expression: =IF(TODAY()>[Opp Exp Decision Date], ([Local Member Firm Fees]*[Opp Probability]/100)/295*0.5,[Local Member Firm Fees]*[Opp Probability]/100/295)/IF(((([Opp Est Eng End Date]-[Opp Est Eng Start Date])/30)=0),1,([Opp Est Eng End Date]-[Opp Est Eng Start Date])/30)

the number is a little off. Can somebody please guide me on how to link the two with division?

Labels (1)
11 Replies
Anonymous
Not applicable
Author

Hi Can you share a sample app to highlight your issue?

sunny_talwar
MVP
MVP

Did you try using my Sum(Aggr(...)) logic? I feel that should work

Not applicable
Author

can you type out the whole expression for me? I tried using the sum aggr expression and I see the expression is in error.

=sum(aggr(IF(TODAY()>[Opp Exp Decision Date], ([Local Member Firm Fees]*[Opp Probability]/100)/295*0.5,[Local Member Firm Fees]*[Opp Probability]/100/295))),IF(((([Opp Est Eng End Date]-[Opp Est Eng Start Date])/30)=0),1,([Opp Est Eng End Date]-[Opp Est Eng Start Date])/30)))

sunny_talwar
MVP
MVP

Can you provide me the list of dimensions used in your pivot table?

Not applicable
Author

I would like to provide a sample excel file, where do I attach it?

sunny_talwar
MVP
MVP

I just want to know the names of the dimensions.

Not applicable
Author

dimension used for the numerator:dimension1.PNG

dimension2.PNG

these are the used dimensions. Let me know if this is what you need.

Not applicable
Author

I am trying to show Column N in Qlikview. Somebody please help!

Not applicable
Author

Hi Brian,

I added a sample file in the bottom just now.