Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Multipication with a 0

Hi,

I need to work out the value of an order with a sales price of 0. Obviously this is 0. however,not all orders have a quantity of zero.

The calculation I have used is


=if([Sales FC Unit Price]=0,'0',
if ([Sales FC Unit Price]>0,
[InvHistory Transaction Quantity] * [Sales FC Unit Price])

This works fine for all the orders that have a price and quantity however, for any records with a sales price of 0 they disappear. I have unchecked the Suppress Zero-Values in the presentation tab of the expression but not joy.

Can anyone help, I guess there is a simple way round this

2 Replies
sunny_talwar

What if you do this

=if([Sales FC Unit Price]=0, 0.00000001,

if ([Sales FC Unit Price]>0,

[InvHistory Transaction Quantity] * [Sales FC Unit Price])

Not applicable
Author

Perfect thank you very much