Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
IMPORTANT: Upcoming LEF Database Maintenance, Oct. 3rd - SEE DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Creator III
Creator III

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

 

1 Solution

Accepted Solutions
Highlighted
Specialist II
Specialist II

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
Highlighted
Specialist II
Specialist II

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

Highlighted

May be try this

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

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

Thanks

 

Daniel

Highlighted
Creator III
Creator III

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