[英]Round/CEIL in SSAS calculated measure
I want to convert seconds into minutes according to the user. 我想根据用户将秒转换为分钟。
For Example: If user did 2 calls of 20 seconds then my caluclations are converting it to two calls of 60 sec=120s 例如:如果用户进行了20秒的2次通话,那么我的计算将其转换为60秒= 120秒的两次通话
But I want to change it to 20+20 =40s ~ 60s 但我想将其更改为20 + 20 = 40s〜60s
Can anyone help me with this? 谁能帮我这个?
I have used below MDX 我在MDX下面用过
CASE [USAGETYPE].[USAGETYPE]
WHEN [USAGETYPE].[USAGETYPE].&[VOICE] THEN (ROUND(([Measures].[RATEDVOLUME]/60))*60)
WHEN [USAGETYPE].[USAGETYPE].&[ROAMING VOICE] THEN (ROUND(([Measures].[RATEDVOLUME]/60))*60)
But it is converting 20 sec to 0 mins. 但是它将20秒转换为0分钟。 Can anyone tell me what is equavalant of ceil function in MDX 谁能告诉我在MDX中ceil函数是否等同
建议您创建一个基本度量,将其隐藏,然后创建一个计算得出的度量,以对合计值进行四舍五入。
Do you want convert: 20s -> 1m; 您要转换:20s-> 1m; 40s -> 1m; 40s-> 1m; 60s -> 1m; 60s-> 1m; 80s -> 2m; 80s-> 2m; ? ?
Then try the reverse int: 然后尝试反向int:
-int(-[Measures].[RATEDVOLUME]/60)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.