Forum Discussion

gkarlo's avatar
gkarlo
Helper I
2 years ago
Solved

Filters and Cards Issues

Hi everyone.... I have two problems with one card: First:  I have a mesure that is the sum of all values of one table with all partners, however I have another table which has exclusive Partners t...
  • MFelix's avatar
    2 years ago

    Hi gkarlo ,

     

    The syntax you use is HASONEVALUE this means that if you only select A you get the 0 but when you select A & B you are selecting more than one value you do not have 1 single selection so you get the 1000.

     

    In this case you should use the ISFILTERED option:

    created measure = IF(ISFILTERED('Table1'[Organization]),0, measure)

    Be aware that using this syntax if you have selected all the values it means that it's filtered so if you only want to have the values when all the organizations are selected you can redo your measure to something similar to this

    created measure = 
    var _TotalOrganizations = COUNTROWS(ALL('Table1'[Organization]))
    Return
    IF(IF(COUNTROWS(VALUES'(Table1'[Organization])) <> _TotalOrganizations,0, measure)

     

     

    Concerning the second part of the question not sure If I understand what you want to achieve can you please give some more context.