Forum Discussion

darpao's avatar
darpao
New Member
5 years ago
Solved

Multiple response and filters

I have a survey that generate 2 tables, one main table like this (Main):   ID Year Country 1 2018 UK 2 2019 USA 3 2019 USA 4 2020 Germany 5 2020 USA 6 2018 German...
  • darpao's avatar
    darpao
    5 years ago

    Finally I was able to find the solution.

    Thank you ERD because your code helped me.

     

    This is what I was looking for:

     

    #Percentage = VAR main_id = CALCULATE(COUNTROWS('T-main'),REMOVEFILTERS('T-tech'[Technology]))
    VAR tech_id = COUNT('T-tech'[ID])
    VAR percentage = tech_id / main_id
    RETURN
    COALESCE(percentage,0)