Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Dynamically show/hide cards based on column values

Hi All,

I have a requirement as below:

I have two cards ,1. Balance Available 2. Ending Balance which are two measures. Both these cards should dynamically hide and show the measures based on "Category" field shown below. (that is when BSF category is selected the card should show Ending balance measure and when "UI" is selected , it should show Balance Available measure
Note: There are no slicers for Category. Based on  the user access/other slicers available in the report, the category column gets filtered in the report.

 

Can someone let me know how this can be achieved?

Thanks

Poojitha

 

  • AbhiSSRS's avatar
    AbhiSSRS
    5 years ago

    Please see if this would help :

     

     

    The card is mapped to a measure :

    Measure = IF(LOOKUPVALUE(Sheet2[Column2],Sheet2[Column1],SELECTEDVALUE(Sheet1[Category]))="Ending Balance",
    SUMX(Sheet1,Sheet1[EndingBalance]),
    SUMX(Sheet1,Sheet1[BalanceAvailable]))
     
    The card visual's title is mapped to Category as well.
  • AbhiSSRS's avatar
    AbhiSSRS
    5 years ago

    Probably you are missing a relationship between the tables in model.

20 Replies

  • aj1973's avatar
    aj1973
    Community Champion

    Hi Anonymous 

    You can achieve that by using 

     

     

  • AbhiSSRS's avatar
    AbhiSSRS
    Solution Sage

    Hello!

    isn't this feasible with a measure on selected value for Category for you? The Label will default to the selected Value with no need to hide/unhide

     

     

     

    Am I missing something here?

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi AbhiSSRS 
      Please note that there is not slicer for the "Category" field, this field is getting filtered based on the other slicers available.
      Is there a way to achieve this? As there are two measures to be shown dynamically.

      • AbhiSSRS's avatar
        AbhiSSRS
        Solution Sage

        It would still work! the selected value for the control which shows 'Category' will automatically show up  the corresponding value on the card visual. Like when BSF is selected(based on other selections as you mentioned) it would display Ending Balance in the Card.