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

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
mostal75
Contributor III
Contributor III

Extract values in special fields

Hello,

I need your help to manage special case found.

In database my field store numbers like 1, 2, 33, 1027.....

In fact, each 2^x represent specific value.

For example:

2^0=1 --> blue car

2^1=2 --> red car

2^2=4 --> orange car

.....

For a customer, this field stores any cars they have. If they have a blue car, value is simple: 1. If a customer have 2 cars, the value is the sum of the two values (example: 6 for a red and orange car). I have lots of combination so it seems impossible to create a pick/match function.

Do you have any idea to extract each single result (cars) in this example please ?

Regards

Regis

Labels (2)
13 Replies
sunny_talwar
MVP
MVP


@mostal75 wrote:
Hopefully not 🙂
Only 1 color by car in a field line

Hopefully not? What are you saying? I am not sure I follow your question and your data well enough... can you share an image of your data to help us understand what you have?

dwforest
Specialist II
Specialist II

https://help.qlik.com/en-US/sense/September2018/Subsystems/Hub/Content/Sense_Hub/Scripting/Operators...
Think this may be what you're looking for.
in your example: 7 bitand 2 = 1
and 6 bitand 1 = 0
This would allow you to test your total value to see if the specific color bit it set.
mostal75
Contributor III
Contributor III
Author

thanks a lot
I have a look and keep you in touch

Regards
mostal75
Contributor III
Contributor III
Author

Sounds grenat
Thanks a lot