Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

If functions on cards

ISSUE: When I choose all as a Filter, Portfolio Name and OCM Owner shows value that is FIRST to both fields. The FIRSTS of each data isn't the right relationship. 

 

QUESTION: Is there a way that if the filter is ALL, the Portfolio Name and OCM Owner cards would both show DASH (-) or null. There's no issue if I select a specific Portfolio Name because both cards show the correct values. 

 

 

  • Anonymous's avatar
    Anonymous
    6 years ago

    Anonymous 

     

    Measure1 = IF(ISFILTERED(Sheet1[Portfolio Name]),[Portfolio Name],"-")
    Measure2 = IF(ISFILTERED(Sheet1[Portfolio Name]),[OCM Owner],"-")
     
    Best Regards
    Paul Zheng

4 Replies

  • Greg_Deckler's avatar
    Greg_Deckler
    Icon for Community Champion rankCommunity Champion

    Perhaps try something like:

     

    IF(HASONEVALUE('Table'[Column]),< whatever your value is >, BLANK())

  • itsmebvk's avatar
    itsmebvk
    Icon for Continued Contributor rankContinued Contributor

    Anonymous  Create a measure with follwing expression and see if that helps you.

     

    Value =
    var Distinct_Count = DISTINCTCOUNT(BaseData[Color])
    var Count_All = CALCULATE(DISTINCTCOUNT(BaseData[Color]),ALL(BaseData[Color]))
    return IF(Distinct_Count=Count_All,"-----",SUM(BaseData[SalePrice]))
     
    Click 👍 if your issue is resloved.
  • Anonymous's avatar
    Anonymous
    Not applicable

    Anonymous 

     

    Measure1 = IF(ISFILTERED(Sheet1[Portfolio Name]),[Portfolio Name],"-")
    Measure2 = IF(ISFILTERED(Sheet1[Portfolio Name]),[OCM Owner],"-")
     
    Best Regards
    Paul Zheng
  • You might also be able to use a measure with the SELECTEDVALUE function which has an optional parameter for what to return when there are multiple values selected.

    eg.

     

    Portfolio Name (Card) = SELECTEDVALUE(  'tablename'[Portfolio Name] , "-")