Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
davyqliks
Specialist
Specialist

help with calculation when dimension is null

Hi,

I have the following calculation:

([UK Invoice Item Unit Price] - [UK Item Master Rebate Unit Price]) * [Stock Estimated Balance UK]

I am finding that if the return for [UK Item Master Rebate Unit Price] is Blank, the calculation returns a zero.

 

e.g 

0.02652 - 0 * 25500 should be 676.26 but i am returning a 0

while 0.0136 - 0.0066 * 1515 returns the correct 10.60

I wonder if anyone can assist in adding an if clause.... if that is the best way to go as i cannot get this right.

Thanks

 

Labels (4)
1 Solution

Accepted Solutions
jwjackso
Specialist III
Specialist III

Try

If (IsNum([UK Item Master Rebate Unit Price],

([UK Invoice Item Unit Price] - [UK Item Master Rebate Unit Price]) * [Stock Estimated Balance UK],

[UK Invoice Item Unit Price]  * [Stock Estimated Balance UK])

View solution in original post

4 Replies
jwjackso
Specialist III
Specialist III

Try

If (IsNum([UK Item Master Rebate Unit Price],

([UK Invoice Item Unit Price] - [UK Item Master Rebate Unit Price]) * [Stock Estimated Balance UK],

[UK Invoice Item Unit Price]  * [Stock Estimated Balance UK])

sunny_talwar

May be try this

RangeSum([UK Invoice Item Unit Price], -[UK Item Master Rebate Unit Price]) * [Stock Estimated Balance UK]
davyqliks
Specialist
Specialist
Author

Thank you for taking the time to reply, this worked perfectly.

Thanks

 

Daniel

davyqliks
Specialist
Specialist
Author

Hi Sunny,

Thank you for taking the time to reply, i tried the other method posted first and it worked but wanted to thank you for taking the time to post an answer.

Thanks

Daniel