Hi,
I'm facing an issue in BO reports.
My requirement is:
For each employee, based on scheduled field (in the database), I need the count of scheduled incidents and un-scheduled incidents.
For ex: Values in the Database for Absence Table
EmplID SCheduled
1 Y
1 Y
1 N
2 Y
2 N
2 N
Required Output is:
EmplID Sch Incidents(Y) Unsch Incidents (N)
1 2 1
2 1 2
My approach:
I created 2 variables in the report.
One for
Sch Incidents = If Scheduled ='Y' count(scheduled)
and the other for
Unsch Incidents = If scheduled='N' count(scheduled)
Using these variables in the report, the output that I receive is:
EmplID Sch Incidents Unsch Incidents
1 2
1 1
2 1
2 2
I get two rows one with scheduled ='Y' and the other with scheduled='N', since scheduled field is selected in the select query. If scheduled field is not selected in the select query, I'm unable to create the 2 variables Sch Incidents and Unsch Incidents.
Please let me know the best approach to get the required output.
Thanks,
Anu.
I'm facing an issue in BO reports.
My requirement is:
For each employee, based on scheduled field (in the database), I need the count of scheduled incidents and un-scheduled incidents.
For ex: Values in the Database for Absence Table
EmplID SCheduled
1 Y
1 Y
1 N
2 Y
2 N
2 N
Required Output is:
EmplID Sch Incidents(Y) Unsch Incidents (N)
1 2 1
2 1 2
My approach:
I created 2 variables in the report.
One for
Sch Incidents = If Scheduled ='Y' count(scheduled)
and the other for
Unsch Incidents = If scheduled='N' count(scheduled)
Using these variables in the report, the output that I receive is:
EmplID Sch Incidents Unsch Incidents
1 2
1 1
2 1
2 2
I get two rows one with scheduled ='Y' and the other with scheduled='N', since scheduled field is selected in the select query. If scheduled field is not selected in the select query, I'm unable to create the 2 variables Sch Incidents and Unsch Incidents.
Please let me know the best approach to get the required output.
Thanks,
Anu.