I'm delving into the stats I can pull from our Active Directory. Active Directory has a field called UserAccountControl, which stores its attributues in a value that PowerBI reads as a number. The data contained is essentially binary data, although i cannot convert the field to Binary (set type as Binary) as it errors.
I'm hoping someone else might have worked with data like this before and might be able to point me towards the best method of identifying whether a certain attribute is set to True or False.
For example, for 1 record the value is coming up as 514. This means that the attributes that represent the Binary value of 2 (2nd bit) and 512 (bit 10) have been set as true. So if I wanted to check if the value of 2rd bit was enabled (the value of 2), i can see mathimatically that this is the case. This example is fairly easy in this case, but seems pretty difficult when you start getting numbers with quite a few bit's turned on.
Surely there must be a fairly common method of checking bits that i can use in Power BI through either M or Dax. Does anyone know a good method?