Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
dana
Creator III
Creator III

Creating table fields based on binary numbers

Hi People,

I would appreciate some guidance in achieving the following:

I would like to generate records with 4 fields, having 0 or 1, using a loop that will run for binary values 1 to 15.

For example,

Loop index 1, value: 1000

Loop index 9 , value: 1001

Loop index 15, value: 1111

 

Thanks in Advance!

 

 

Labels (3)
1 Solution

Accepted Solutions
marcus_sommer

Just put text() around it like: text(num(Index, '(bin)'))

- Marcus

View solution in original post

4 Replies
Or
MVP
MVP

Use Num() or Num#() with the format set to '(bin)'. This will force Qlik to format or interpret numeric values as binary.

dana
Creator III
Creator III
Author

Hi,

The expression you suggested is not giving me the binary format I need.

My loop will generate values from 1 to 15.

I need to represent them as binary numbers, in order to split them later to 4 fields.

Thanks..

 

 

marcus_sommer

Just put text() around it like: text(num(Index, '(bin)'))

- Marcus

dana
Creator III
Creator III
Author

Cool!!

Thanks!