Forum Discussion

Shahabr's avatar
Shahabr
New Member
4 years ago
Solved

Page selection by Dax Code

I Want My page to be Dark by Recieving night time and get light by day time,i define two different page with dark and light background, i dont know how to use dax to define the situation ? help me please

  • Shahabr 

    If I understood your question correctly, you need to be able to chagne the color of your Page background based on the hour of the day example, before 6 PM blue and after 6PM black.
    Insert a shape on the page and expand it to cover the page, under STYPE> FILL use the follow meaure to apply conditional color

    Color = IF( HOUR(NOW()) > 18 , "Black" , "Blue")


     

2 Replies

  • Shahabr 

    If I understood your question correctly, you need to be able to chagne the color of your Page background based on the hour of the day example, before 6 PM blue and after 6PM black.
    Insert a shape on the page and expand it to cover the page, under STYPE> FILL use the follow meaure to apply conditional color

    Color = IF( HOUR(NOW()) > 18 , "Black" , "Blue")


     

    • Shahabr's avatar
      Shahabr
      New Member

      In fact, I have two pages and I want to use Dax code which is shown by considering the time
      my English is not well, thank you for your help