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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Goodman_UPS
Contributor II
Contributor II

Creating a Measure from a Dimension

I have a dimension that I created called Proposed Bucket.

Here is my if statement:

=If(Excp_Category='6-Attempted','2-CUSTOMER ACTION',
if(Excp_Category = '1-Manifest','5-APPLE ACTION',
    If(Excp_Category='5-Out for Delivery','3-OUT FOR DELIVERY',
    if(Current_Scan_Activity_Record_Type='Out For Delivery','3-OUT FOR DELIVERY',
    IF(Excp_Category='7-Delivery','1-DELIVERED', [Exception_Resolution_Proposed_Bucket])))))
 

I want to create a measure that adds up certain elements of this proposed bucket. 

Labels (1)
3 Replies
BrunPierre
Partner - Master II
Partner - Master II

Sum({$<[Proposed Bucket]={'2-CUSTOMER ACTION','1-DELIVERED'}>} Measure)

Goodman_UPS
Contributor II
Contributor II
Author

I get error in expression when used.

BrunPierre
Partner - Master II
Partner - Master II

It was simply an example that needed to be adjusted to reflect field names in the model.

Perhaps you could post a sample of the dataset.