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: 
Not applicable

Rolling up values into a new value in a different field

Good Morning

I have the following sample data ( attached ). All I want to do is say

if Sales_Number begins with 9 then assign a new Region called  'Unrestricted'.

Thanks

1 Solution

Accepted Solutions
varshavig12
Specialist
Specialist

if(WildMatch(Sales_Number ,'9*',Region),'unrestricted',Region)

View solution in original post

9 Replies
varshavig12
Specialist
Specialist

Try this:

if(WildMatch(Sales_Number ,'9*',Region),'unrestricted',Region)

Not applicable
Author

Thanks Varsha. What's the 'a' for ?

Not applicable
Author

sorry ignore that ... my page had not displayed correctly

varshavig12
Specialist
Specialist

if(WildMatch(Sales_Number ,'9*',Region),'unrestricted',Region)

trdandamudi
Master II
Master II

May be as below:

=if(Left(Sales_Number,1)=9,'Unrestricted',Region) as Region

varshavig12
Specialist
Specialist

You got the desired output ?

Not applicable
Author

Unfortunately not. It doesnt return a region if you select any of the sales beginning 9,

Not applicable
Author

Perhaps I know why .... The Sales_number is actually referenced in another table which is the main table. The table provided in my sample is what's it doing a left join on and linking via the sales_number.

Not applicable
Author

Worked in the end. Thank you !