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

Announcements
Write Table now available in Qlik Cloud Analytics: Read Blog
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

calculated dimension

Hi Experts,

I have a table which has fields Product no, Delivery details.

below are some sample field values.  

Product noDelivery Details
S125Delivered at Croydon
Not Delivered
S126Not Delivered
Delivered at Birmingham
S130Not Delivered
S140Delivered at Reading
Not Delivered

I need to populate this in a pivot table, but i want to display one line per Product.

For ex. if a product has two lines Delivered at... & Not Delivered, then i want to display 'Delivered at..'

if a product has one line, display as it is.

The result should be,

  

Product noDelivery Details
S125Delivered at Croydon
S126Delivered at Birmingham
S130Not Delivered
S140Delivered at Reading

i dont want to do this in script. i want this in table.

Please somebody help me

11 Replies
effinty2112
Master
Master

You could try:

Set a variable to keep things tidy:

vDelivered = if(WildMatch([Delivery Details],'*Delivered at*'),1,0)

Then use this expression:

if(sum($(vDelivered)) = 0, 'Not delivered', concat(if($(vDelivered) = 1,[Delivery Details])))

giving this table:

Product no Delivery Details
S125Delivered at Croydon
S126Delivered at Birmingham
S130Not delivered
S140Delivered at Reading

Regards

Andrew

Not applicable
Author

Thanks to all