Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago

Using calculate with IF

i want to get distinct count of student_id with a condition that if it id is there then it should display Yes and if no enrollemnt id then NO.

 
Issue is im not able to call that variable in measure formula or pwoer bi is not detecting it
Let me know where im wrong
 
 

2 Replies

  • Hi Anonymous ,

     

    Your description doesn't sound right.

    How can you display YES or NO for a count value?

    Do you mean display distinct count value of Student ID if Enrollemtnt Id is not blank?

    Please elaborate your query by sharing some sample data screenshots with the desired output.

     

    Thanks,

    Pragati

     

  • Anonymous , Not sure what you want to do with yes or No. try like

    fn1 = CALCULATE(DISTINCTCOUNT(student [Employeeid]),not(isblank(student[Enrolemntid])))