简体   繁体   English

将Excel公式转换为SQL Report Builder表达式

[英]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: 我得到了一个excel公式,我需要它在SSRS Report Builder 3.0中作为表达式工作,这是原始的Excel公式:

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

Instead of cell A01 the value field in SSRS is called [diff] 代替单元格A01,SSRS中的值字段称为[diff]

Essentially its an expression to round a number of hours into number of days but the hours aren't inputted in 24's. 从本质上讲,它是将小时数舍入为天数的表达式,但小时数并非以24的形式输入。

Thanks 谢谢

Try: 尝试:

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

Let me know if this helps. 让我知道是否有帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM