Forum Discussion

Sobhan_1380's avatar
Sobhan_1380
New Member
1 year ago
Solved

Power BI

Hello everyone,

I have two slicers (Slicer 1 and Slicer 2) and a card visual in my report. When both slicers are selected, the card displays a numeric value. However, when either one or none of the slicers is selected, the card shows the message: "Please select both Slicer 1 and Slicer 2."

Now, I want the font size of the message to be smaller when the text is displayed, and the font size of the number to be larger when the numeric value appears.

Is there a way to achieve this?
I’d appreciate any guidance!

  • Hi Sobhan_1380,

     

    Thank you for reaching out to Microsoft Fabric Community.

     

    Currently, power bi does not support dynamic font size changes within a single card visual based on slicer selection. But we can achieve the required behavior by using two separate card visuals, one for the numeric value and another for the message and overlaying them in the same position.

    Use DAX measures to return either the numeric value or the message based on slicer selections and return blank otherwise. This way only one card will show at a time, simulating a dynamic font size change.

     

    If this post helps, then please consider Accepting as solution to help the other members find it more quickly, don't forget to give a "Kudos" – I’d truly appreciate it! 

     

    Thanks and regards,

    Anjan Kumar Chippa

6 Replies

  • v-achippa's avatar
    v-achippa
    Community Support

    Hi Sobhan_1380,

     

    Thank you for reaching out to Microsoft Fabric Community.

     

    Currently, power bi does not support dynamic font size changes within a single card visual based on slicer selection. But we can achieve the required behavior by using two separate card visuals, one for the numeric value and another for the message and overlaying them in the same position.

    Use DAX measures to return either the numeric value or the message based on slicer selections and return blank otherwise. This way only one card will show at a time, simulating a dynamic font size change.

     

    If this post helps, then please consider Accepting as solution to help the other members find it more quickly, don't forget to give a "Kudos" – I’d truly appreciate it! 

     

    Thanks and regards,

    Anjan Kumar Chippa

    • v-achippa's avatar
      v-achippa
      Community Support

      Hi Sobhan_1380

       

      As we haven’t heard back from you, we wanted to kindly follow up to check if the solution I have provided for the issue worked? or let us know if you need any further assistance.
      If my response addressed, please mark it as "Accept as solution" and click "Yes" if you found it helpful.

       

      Thanks and regards,

      Anjan Kumar Chippa

      • v-achippa's avatar
        v-achippa
        Community Support

        Hi @Sobhan_1380

         

        We wanted to kindly follow up to check if the solution I have provided for the issue worked.
        If my response addressed, please mark it as "Accept as solution" and click "Yes" if you found it helpful.

         

        Thanks and regards,

        Anjan Kumar Chippa