Skip to main content

App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Announcements
QlikWorld 2023, a live, in-person thrill ride. Save $300 before February 6: REGISTER NOW!
cancel
Showing results for 
Search instead for 
Did you mean: 
neena123
Partner - Creator
Partner - Creator

Trying to create an expression in a pivot table.

I currently have 4 Shipping periods: 0-24 hours, 24-48 hours, 48-72 hours, and 72+hours. I want to focus on the 72+. Some orders are usually done way ahead of shipment. So that means they are put under the 72+ hours category but technically they are not carryover orders and don't need to be labeled as orders that haven't been shipped yet. How can I distinguish the difference between these orders and orders that are actually "delayed" or "late" for shipment? I have a Ship By Date field that tells me when the order is supposed to go out. But how do I go about this? The CarryOver Dimension is currently calculated like this

=if([CarryOver Days]<1,'0-24 hours',

if([CarryOver Days]=1,'24-48 hours',

if([CarryOver Days]=2,'48-72 hours',

if([CarryOver Days]>2,'72+ hours'))))

The Ship by date is an actual date field. If an order has a Ship By Date that means it technically is not a CarryOver order. This will help the mangers in the warehouse to see what is truly is a delayed shipment and what orders does not need to be shipped out till a later date.

1 Solution

Accepted Solutions
pradosh_thakur
Master II
Master II

May be this if not please proved a few more details .


i am assuming [Ship By Date] as the field name


=if(len(trim([Ship By Date]))=0,'delayed', if([CarryOver Days]<1,'0-24 hours',

if([CarryOver Days]=1,'24-48 hours',

if([CarryOver Days]=2,'48-72 hours',

if([CarryOver Days]>2,'72+ hours')))))

Learning never stops.

View solution in original post

2 Replies
pradosh_thakur
Master II
Master II

May be this if not please proved a few more details .


i am assuming [Ship By Date] as the field name


=if(len(trim([Ship By Date]))=0,'delayed', if([CarryOver Days]<1,'0-24 hours',

if([CarryOver Days]=1,'24-48 hours',

if([CarryOver Days]=2,'48-72 hours',

if([CarryOver Days]>2,'72+ hours')))))

Learning never stops.
neena123
Partner - Creator
Partner - Creator
Author

Thank You! That worked!