Scenario:
I'm going to share with you a little trick, just make a clock visual with DAX.
The visual looks like this:
Operation
The operation steps are as follows:
- Create a new table as the hour slicer of clock visual.
clock = GENERATESERIES(1, 24, 1)
- The most important is to use the characteristics of UNICHAR function to dynamically display different vision
clock =
var hours = SELECTEDVALUE(clock[Hour],1)
var _12h = IF(hours>12,hours-12,hours)
return UNICHAR(128335+_12h)
- Drag this measure into card visual and then will show a clock visual.
Unicode table used
Here is the Unicode of the clock. We can change the visual of the clock by changing the value of the Unicode.
Clock Symbol | Clock Name | Decimal |
π | Clock Face One Oclock | 128336; |
π | Clock Face Two Oclock | 128337; |
π | Clock Face Three Oclock | 128338; |
π | Clock Face Four Oclock | 128339; |
π | Clock Face Five Oclock | 128340; |
π | Clock Face Six Oclock | 128341; |
π | Clock Face Seven Oclock | 128342; |
π | Clock Face Eight Oclock | 128343; |
π | Clock Face Nine Oclock | 128344; |
π | Clock Face Ten Oclock | 128345; |
π | Clock Face Eleven Oclock | 128346; |
π | Clock Face Twelve Oclock | 128347; |
π | Clock Face One-thirty | 128348; |
π | Clock Face Two-thirty | 128349; |
π | Clock Face Three-thirty | 128350; |
π | Clock Face Four-thirty | 128351; |
π | Clock Face Five-thirty | 128352; |
π‘ | Clock Face Six-thirty | 128353; |
Tips
You can also use the UNICHAR function and other Unicode to create the visual you want.