Forum Discussion

siac16's avatar
siac16
Regular Visitor
4 years ago
Solved

Help with Divide

Hi I currently have a table with the following fields Source Do you use it? Gender Age Income Internet YES M 18-25 1000-2000 Internet NO F 26-35 2001-3000 TV YES M 36-45 ...
  • v-angzheng-msft's avatar
    4 years ago

    Hi, siac16 

     

    A measure could be like this:

    Measure = 
    var _DIVIDE=
    DIVIDE(
        CALCULATE(COUNT('Table'[Do you use it?]),FILTER(ALLSELECTED('Table'),'Table'[Do you use it?]="YES")),
        CALCULATE(COUNTROWS('Table'),ALLSELECTED('Table'))
        )
    VAR _IF=IF(_DIVIDE=BLANK(),0,_DIVIDE)
    
    RETURN _IF

     Result:

    Please refer to the attachment below for details.

    Hope this helps.

     

     

    Best Regards,
    Community Support Team _ Zeon Zheng


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