Forum Discussion

jochendecraene's avatar
2 years ago
Solved

Has value based on id

Hi   I got a list of caseid's and type of contacts with clients. I need to make the difference between id's where there has been a face to fase contact and the ones without a face to face contact. ...
  • Fowmy's avatar
    2 years ago

    jochendecraene 

    The the following two measures:

    With_F2F =  
    	CALCULATE(
    		DISTINCTCOUNT( Table02[caseid] ),
    		Table02[Face to face] = "YES"
    	)

     

    No_F2F =  
    	SUMX(
    		DISTINCT( Table02[caseid] ),
    		CALCULATE( INT(NOT "YES" IN VALUES( Table02[Face to face] )))
    	)
  • Ritaf1983's avatar
    Ritaf1983
    2 years ago

    Ok jochendecraene 
    This is a little tricky.

    The measures you can use :

    1.

    Count_face_to_face =
    COUNTX(
        CALCULATETABLE('Table','Table'[Type]="face to face"),DISTINCTCOUNT('Table'[Id]))
    2. 
    Count_others =
    VAR t =
        SUMMARIZE('Table','Table'[Id],"face_to_face_count",[Count_face_to_face])
        RETURN
        CALCULATE(DISTINCTCOUNT('Table'[Id]),FILTER(t,ISBLANK([face_to_face_count])))
    Result :

     

    Pbix is attached

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