Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

SUM, Filter by Two Columns text values

Hi All,   I am trying to perform a calculation where I do the following   SUM column 1 Filter by column 2 (multiple text values) and Filter by column 3 (multiple text values) Can this be done...
  • v-chenwuz-msft's avatar
    v-chenwuz-msft
    4 years ago

    Hi Anonymous 

     

    Try this measure:

    Measure =
    VAR _filter_from_Start =
        FILTER(
            'Table',
            [Start Street] = "1st street"
                || [Start Street] = "2nd street"
                || [Start Street] = "10th street"
        )
    VAR _filter_from_End =
        FILTER(
            _filter_from_Start,
            [End Street] = "2nd street"
                || [End Street] = "3rd street"
                || [End Street] = "8th street"
        )
    RETURN
        SUMX( _filter_from_End, [Distance Miles] )
    

    But the conditions is too long or in your data, is that possible to use start street not equal waterloo road?

    If is , filter with the condition  

    [Start Street]<>”waterloo road”

     

    Best Regards

    Community Support Team _ chenwu zhu

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.