Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
cbaqir
Specialist II
Specialist II

Set Analysis Question

I am having trouble getting my set analysis syntax to work to timesheet approval compliance.

In the app, the user sees an Approval Compliance metric that should update depending on selections. I would think this would be an easy caluclation but it is obviously not working.

=num(Count({<[APPROVE_COMP]= {'Y'}>} TIMESHEET_LINE_ID)/(Count(DISTINCT TIMESHEET_LINE_ID)), '##.0%')

One of the filters in a list box that a user can select is Approve Compliance Y or N. You would expect that if the user selects Approve Compliance N that the Approval Compliance % would be 0%.

However, for some strange reason, selecting N on Approval Compliance is giving me an outrageous % (12350.0%).

Any insight?

Thanks in Advance,

Cassandra

2 Replies
julian_rodriguez
Partner - Specialist
Partner - Specialist

Hello Cassandra

I think that the problem is because you are forcing the formula to be evaluated over the [APPROVE_COMP]= {'Y'} values.

That is, this SET ANALISYS is ignoring any selections on the field "[APPROVE_COMP]"

The 12350.0% sould be the result of the operation, without doubt.

If you want to see what is the percentage of this operation, remove the Set Analysis and make filters, by this way you can see the % of Y and N respectly.

Final question, are you using this formula on a text box?... because one chart should be equal to Null()

Regards



cbaqir
Specialist II
Specialist II
Author

Thanks, Julian.

I have two metrics in text boxes to always display the Submission Compliance % and the Approval Compliance %.

I do have a filter to allow the user to select Submit Y/N and/or Approve Y/N so I'm not sure what you mean by removing the set analysis to use the filter. How else would I be able to calculate timesheet lines that are compliant / the total # of timesheet lines without using set analysis?

Regards,

Cassandra