Mike Mike - 2 months ago 16
SQL Question

Converting an Excel Formula into SQL Report Builder Expression

I have been given an excel formula and I need it to work in SSRS Report Builder 3.0 as an expression, This is the original Excel formula:

IF(A01>12,ROUND(A01/24,0),1)

Instead of cell A01 the value field in SSRS is called [diff]

Essentially its an expression to round a number of hours into number of days but the hours aren't inputted in 24's.

Thanks

Answer

Try:

=IIF(Fields!diff.Value>12,ROUND(Fields!diff.Value/24.0),1)

Let me know if this helps.

Comments