I was recently working on a new Secure Boot State Power BI report and I wanted to use the native view from the ConfigMgr database that was created for the Secure Boot State hardware inventory extension (see Inventory Secure Boot State and UEFI with ConfigMgr). The value that gets returned is 0, 1 or null depending on how the hardware is configured. 0 means that Secure Boot is Off, 1 means it is On and null means that it is not reported and the system is probably running BIOS.
Those labels look much better than 0, 1 or nothing, so I wanted an easy way to modify the Power BI report without creating a custom query (which is also possible). Fortunately, Power BI has the ability to add a New Measure. For my New Measure, I selected New Column (New Measure is the other option). I gave my New Column the name “Secure Boot State”. The next thing was to translate the UEFISecureBootEnabled0 field into “On”, “Off”, or “BIOS”. Using the IF function, this was possible:
Secure Boot State = IF (ISBLANK(v_GS_UEFI_SecureBootState0[UEFISecureBootEnabled0]),”BIOS”, (IF (v_GS_UEFI_SecureBootState0[UEFISecureBootEnabled0]=1,”On”, (IF (v_GS_UEFI_SecureBootState0[UEFISecureBootEnabled0]=0,”Off”)))))
Now you can see that I have a new column and my source data set remains un-touched:
This will be useful in creating my Power BI report for Secure Boot State.
Originally posted on http://miketerrill.net