how do i do case condition with several conditions and reound the results in ssrs

Anonymous
2023-09-01T17:30:15.8433333+00:00

I need to be able to do this in ssrs.

(CASE 		WHEN SUM(CASE WHEN ##NY_TAT_OPERATING_HOURS.IN_OPERATING_HOURS = 1 THEN 1 ELSE 0 END) IN (.0) THEN 0 		ELSE ROUND(SUM(CASE WHEN ##NY_TAT_OPERATING_HOURS.IN_OPERATING_HOURS = 1 THEN ##NY_TAT_OPERATING_HOURS.DE_TAT_MINS ELSE 0 END) / SUM(CASE WHEN ##NY_TAT_OPERATING_HOURS.IN_OPERATING_HOURS = 1 THEN 1 ELSE 0 END),.01) 	END) AS DATA_ENTRY_AVG_MINS_IN 
SQL Server Reporting Services
SQL Server Reporting Services
A SQL Server technology that supports the creation, management, and delivery of both traditional, paper-oriented reports and interactive, web-based reports.
2,795 questions
{count} votes

1 answer

Sort by: Most helpful
  1. AniyaTang-MSFT 12,306 Reputation points Microsoft Vendor
    2023-09-04T01:18:01.4966667+00:00

    Hi @Jones, Jannette (Contractor)

    Do you mean to return results based on multiple conditions in an SSRS expression? Then you can try using the Switch function. You can refer to this link: https://learn.microsoft.com/en-us/sql/reporting-services/report-design/expression-examples-report-builder-and-ssrs?view=sql-server-ver16#DecisionFunctions.

    If the answer is helpful, please click Accept Answer and Up-Vote for the same. If you have any questions, please feel free to let me know.

    Best regards,

    Aniya