Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
Anonymous
Not applicable

Hex to Binary conversion (helping function provided from another post)

I am receiving data for the operation of some sensors which is in Hex format. 

In order to see which sensor is on and which is off, I need to convert this into Binary, thus know which sensors are on or off.

 

example: I get 

0xc00000200
0x1000000
0x400000
0x500000000

0x400040000

0x0

 

Each row of the Hex after 0x at full length must be of 12 characters, so:

0x0 = 0x000000000000 

0x400040000 = 0x000400040000

etc...

the binary results should be of length something like:

0000 0000 0000 1010 0000 0000 0000 0000 0001 0000 0000 0000

 

where each character of the binary represents a sensor.

 

Question: When the HEX  is converted to Binary like above. How am i going to define the name of each of the character in the binary? 

 

so if 0000 0000 0000 1010 ......  I would be able to reverse it and give each of the binary character a name like B1, B2, B3 ... B48.

 

I was hoping someone with good coding knowledge could make this Hex to Decimal function to Hex to Binary instead, in addition of the above requirements. 

 

 

Hope someone has a good solution to this, thanks Smiley Happy

@Greg_Deckler 

1 ACCEPTED SOLUTION
v-piga-msft
Resident Rockstar
Resident Rockstar

Hi @Anonymous ,

By my research, I'm afraid that we cannot convert hex to Binary directly in power bi.

You'd better convert hex to number and then convert number to binary as a workaround.

Here are two thread you could refer to.

https://www.excelandpowerbi.com/?p=291

https://community.powerbi.com/t5/Desktop/Number-to-Binary/m-p/235261#M104739

Best  Regards,

Cherry

 

 

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
v-piga-msft
Resident Rockstar
Resident Rockstar

Hi @Anonymous ,

By my research, I'm afraid that we cannot convert hex to Binary directly in power bi.

You'd better convert hex to number and then convert number to binary as a workaround.

Here are two thread you could refer to.

https://www.excelandpowerbi.com/?p=291

https://community.powerbi.com/t5/Desktop/Number-to-Binary/m-p/235261#M104739

Best  Regards,

Cherry

 

 

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.