Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago

How to apply toggle button for JSON themes switch?

Hi Team,

 

I've built two json themes according to my project requirement. As per power bi there's only way to apply is one after other. But now I've got a requirement to apply both the themes simulteneously using a toggle button on the dashboard itself which would act as switching between the themes. 

 

Please help me in finding out a solution for this.

 

Regards,

Haveesh

10 Replies

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi MFelix ,

       

      The references you shared are manual based approach and the youtube video also a manual approach and works for a single page. But my requirement was different, where I have the JSON theme files and I'm looking for a option where i can have two json files being switched using a toggle button cause that would impact for the whole dashboard irrespective of pages.

       

      Please suggest me on this. 

      • MFelix's avatar
        MFelix
        Super User

        That option is not available currently on Power BI, you can only change a theme of a report in edit mode, since the users don't have access to the edit mode they cannot do it with a button.

         

        You need to have both themes "defined" on the visualizations and pages and then the users can select them.

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi MFelix ,

     

    can you let me know what exactly has happened in there? All I could understand is that a shape was placed and with button feature having a field value of colour code which was given in the table it's being switched. Is this what happeneing, or correct me if i've misunderstood. 

    • MFelix's avatar
      MFelix
      Super User

      The color is being used on the conditional formatting, that will make the change of color when you select one option or the other on the button.

      • Anonymous's avatar
        Anonymous
        Not applicable

        But in this case it would be a manual contional approach but not the json theme approach which I was expecting. Can you let me know if there's any possibility where this would be acheived through json themes and not the manual conditional approaches.

         

        Regards,