Forum Discussion

AmandeepThind's avatar
AmandeepThind
New Member
1 year ago

using Measure to show/hide a card visual | filter disabled

I have created a table in PowerBI desktop named SourceTable and it has a column named Source. There are 2 records in the SourceTable ('External', 'Internal').
I have added this table as a slicer (dropdown) on my dashboard.
Now, I have added a card on my dashboard that displays a single calculated value from a measure, based on some criteria.
I want to hide the card when the user selects 'External' from the slicer. In order to do that, I created a following measure:
IsExternalMeasure = if(SELECTEDVALUE(Source_Table[Source])="External",1,0)
 
When I try to apply this measure as a filter criteria on the card, the filter gets disabled and hence can't proceed.
Please suggest how to overcome this issue. 

5 Replies

  • Hi AmandeepThind  - Instead of using IsExternalMeasure directly as a filter, create a measure that returns a blank value when 'External' is selected

     

    DisplayCardMeasure =
    IF(
    SELECTEDVALUE(SourceTable[Source]) = "External",
    BLANK(),
    [YourActualMeasure] -- Replace with your actual measure that you want to display
    )

     

    Assign DisplayCardMeasure as the value for the card visual.When 'External' is selected in the slicer, the card will display nothing since BLANK() is returned, effectively hiding the card.

     

    or still issue exist, you can try with conditional formatting for font color with measure with 1.

     

    Hope this helps.

  • Hi AmandeepThind Try these out please 

    • Create a Measure for Visibility:

     

    DisplayValue = 
        IF(SELECTEDVALUE(SourceTable[Source]) = "External", BLANK(), [YourOriginalMeasure])

     

    • Apply to Card Visual: Use DisplayValue as the card's value. It will be blank when "External" is selected, effectively hiding the card.
      If this post helped please do give a kudos and accept this as a soltuion
      Thanks In Advance

    • v-aatheeque's avatar
      v-aatheeque
      Icon for Community Support rankCommunity Support

      Hi AmandeepThind ,


      Have you resolved the issue? If yes, kindly mark the helpful answer as a solution if you feel that makes sense. Welcome to share your own solution. More people will benefit from the thread.

      Should you have any further questions, feel free to reach out.
      Thank you for being a part of the Microsoft Fabric Community Forum!

      • v-aatheeque's avatar
        v-aatheeque
        Icon for Community Support rankCommunity Support

        Hi AmandeepThind ,
        Have you resolved the issue? If yes, kindly mark the helpful answer as a solution if you feel that makes sense. Welcome to share your own solution. More people will benefit from the thread.

        Should you have any further questions, feel free to reach out.
        Thank you for being a part of the Microsoft Fabric Community Forum!