Forum Discussion

tcouey's avatar
tcouey
Frequent Visitor
4 years ago
Solved

Help with Divide Function with Countx and Filter

Hi, and thanks for any help. Over the last couple months I've had the opportunity to start editing dashboards at work and am really enjoying it and want to keep pursuing the skill.

 

I'm trying to create a new measure, that looks at two separate columns, in separate tables. 

 

This is what I have so far and am getting the "too few arguments passed to the divide function error" 

 

"MRC Controls as % of Total Issues = DIVIDE(Countx(Filter(Controls,controls[mrc_control] = "Y"),controls[id])) / count(test_issues[id])"
 
For context, I need to look at the mrc_control column in the controls table, and count every control ID that has an MRC value of "Y." I then need to divide that number, by the total count of all the IDs in the test_issues table. 
  • Hello tcouey ,

     

    Please use below measure to fix your error-

     

    MRC Controls as % of Total Issues = DIVIDE(Countx(Filter(Controls,controls[mrc_control] = "Y"),controls[id]), count(test_issues[id]),BLANK())

     

    If that dont gives you expected results please share sample data and expected output in tabular format.

     

1 Reply

  • Hello tcouey ,

     

    Please use below measure to fix your error-

     

    MRC Controls as % of Total Issues = DIVIDE(Countx(Filter(Controls,controls[mrc_control] = "Y"),controls[id]), count(test_issues[id]),BLANK())

     

    If that dont gives you expected results please share sample data and expected output in tabular format.