en
Welcome Guest! To enable all features please Login or Register.
Options
Go to last post Go to first unread
Danilo Rufino  
#1 Posted : Tuesday, January 21, 2020 10:45:13 PM(UTC)
Danilo Rufino
Rank: Advanced Member

Groups: extranet\Forum
Joined: 5/16/2019(UTC)
Posts: 13

Hi all, I have a question about in Memory.

I have the need to calculate, in real time, the Hours and Minutes based on a column that contains the total minutes.

So if I have 179 minutes, I would have 2 hours in my Hours column, and 59 minutes in my Minutes column.

I need to calculate this dynamically because the users can expand a specific WO to see segments, and it needs to recalculate for each level of the hierarchy.

Now, I'm having trouble calculating it in the DataStudio. I'm doing my TotalMinutes/60 to get the Hours, but it returns the decimals, and I can't find a Round function.

And the % doesn't seem to work there, as it does in the ETL, to return the rest of the division.

TL;DR: How do I round numbers and get the rest of the division in the InMemory Data Studio?

Thanks,

Danilo
Danilo Rufino  
#2 Posted : Wednesday, January 22, 2020 3:49:58 PM(UTC)
Danilo Rufino
Rank: Advanced Member

Groups: extranet\Forum
Joined: 5/16/2019(UTC)
Posts: 13

Hi all,

I found a way of doing it. I can leverage the InMemory functions and operators if I do all my calculation on the column property of my measure.

This way I can do my division, and use the % to get the rest of the division as well.

Users browsing this topic
Anonymous
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Notification

Icon
Error

We use cookies to improve your site experience, but they also provide us with information on your use of our website.
To find out more about the cookies we use and how to delete them, see our Privacy Policy. By continuing to browse the site, you are consenting to our use of cookies.

ok