Forum Discussion

BTMoylan's avatar
BTMoylan
Frequent Visitor
3 years ago
Solved

Filter Multiple Responses

Hey All,    I have been building out a report that can filter based off a business location and type of product/service. I am almost done, but I am hoping to refine my results even more. If you loo...
  • Anonymous's avatar
    Anonymous
    3 years ago

    Hi BTMoylan,

    You can write a measure formula to extract the current distance and min distance based on category to compare and return flag. Then you can use this formula and flag as condition on visual level filter to filter records:

    flag =
    VAR currDist =
        MIN ( Table[Distance] )
    VAR minDist =
        CALCULATE (
            MIN ( Table[Distance] ),
            ALLSELECTED ( Table ),
            VALUES ( Table[Organization] ),
            VALUES ( Table[product/service] )
        )
    RETURN
        IF ( currDist = minDist, "Y", "N" )

    Regards,

    Xiaoxin Sheng