Forum Discussion

M_SBS_6's avatar
M_SBS_6
Helper V
3 years ago
Solved

Divide

Hi, 

I need a new calculation to divide one value by another using a filter.

 

count surv_id / count surv_id where surv_log = "yes"

 

Surv_id =4

count surv_id where surv_log "yes" =3

 

So I expect 75%

 

Any idea how to write this out please? 

 

  • Hi M_SBS_6 , try this measure:

    Count_yes = var p_=CALCULATE(count('Table'[surv_id]),'Table'[surv_id]="yes")
    return
    DIVIDE(p_,COUNT('Table'[surv_id]),"-")

    Best regards

2 Replies

  • Hi M_SBS_6 , try this measure:

    Count_yes = var p_=CALCULATE(count('Table'[surv_id]),'Table'[surv_id]="yes")
    return
    DIVIDE(p_,COUNT('Table'[surv_id]),"-")

    Best regards