- SAP Community
- Products and Technology
- Technology
- Technology Q&A
- Formula to calculate Time that has condition.

Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content

Formula to calculate Time that has condition.

Former Member

- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content

on 03-21-2008 5:09 AM

91

Post Author: alexander_tze

CA Forum: Formula

hi everyone,

i'm new to crystal report 2008, wish that you all can help.

i'm trying to calculate some data from a database. Below was the example of the database.

ID Condition Time Floor

1 1 10:54:48 AM 12 1 10:54:48 AM 29 0 10:55:02 AM 210 0 10:55:16 AM 1

With these database, i'm going to calculate the time for each floor ( floor 1 and 2) with the condition "1" and "0"( "1" for start time and "0" for end time). below was the basic theory for the calculation

(Floor 1 with time (10:54:48) and condition="0" ) - ( Floor 1 with time (10:55:16) and condition="1" )

and the result should be 18 second.

The same theory goes to floor 2(Floor 2 with time (10:54:48) and condition="0" ) - ( Floor 2 with time (10:55:02) and condition="1" )

hope that you guys can help me to create a formula for these "time calculation"

- SAP Managed Tags:
- SAP Crystal Reports

Former Member

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Report Inappropriate Content

04-24-2008
5:44 PM

Post Author: pandabear

CA Forum: Formula

Hey alexander,

There's so much info that's needed for this problem, so I'm going to make some assumptions and

give you a possibility. Crystal is a hierarchal (spelling?) animal. When it makes calculations, it

does it from the top down. If the final number for your chart is in the footer, you cannot put the chart

ABOVE that footer and get the final number. e.g. you chart shows the wrong number.

Solution: Process all the numbers in the query; that way you can put the chart any place you want.

If you can't write this query, then try to get someone who can.

The formula you present in the beginning cannot work because the condition "0" or "1" returns 0 data

on the examples you show. If this is part of the real data, you need to change the formula filters.

It's a shot in the dark, but I really hope this helps,

The Panda

Former Member

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Report Inappropriate Content

03-31-2008
9:23 AM

Post Author: alexander_tze

CA Forum: Formula

Hi guys,

Any solution for this problem? i realy want to know the formula on how to calculate the "time" based on that database. if you all have the solution, please shared it with me...

Former Member

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Report Inappropriate Content

03-28-2008
3:47 AM

Post Author: alexander_tze

CA Forum: Formula

i have sent you an e-mail

Former Member

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Report Inappropriate Content

03-27-2008
4:08 PM

Post Author: V361

CA Forum: Formula

I sent you a private message.

Former Member

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Report Inappropriate Content

03-27-2008
3:14 PM

Post Author: V361

CA Forum: Formula

You can send me a private note in the forum, (look for Inbox) I will respond with my email. When you send the rpt, be sure to check the save data option. (File, report options, save data with report)

Former Member

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Report Inappropriate Content

03-27-2008
4:44 AM

Post Author: alexander_tze

CA Forum: Formula

Hi,

My chart was place on the Group Header mean while the formula was placed on the report footer and the value still return "70.00" . For this chart,the formula was taken from fomula editor and assigned in the "Show value" on chart expert. Did i miss something here?

Previousely, i have placed my chart on Report header and using a formula to calculate the "time" directly in "Show Value" on report expert, but the result still the same(70.00 for each value). Please let me know if you have the solution for this problem. i am still not good enough using this software. wish that i can contact u directly (via e-mail or whatever) and send the copy of my chart to you. Thanks.

Former Member

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Report Inappropriate Content

03-26-2008
3:16 PM

Post Author: V361

CA Forum: Formula

Where in the report did you place the formula? , and the chart ?

Former Member

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Report Inappropriate Content

03-26-2008
8:18 AM

Post Author: alexander_tze

CA Forum: Formula

Hi guys,

Thanks for the tips, i appreciate it, but it still cannot be used to create my chart. I have tried it and it's return the "70.00" value for each value of the chart (calculation of max-min). Any other tips or formula that can be applied to create my chart or you guy know any others formula....

Below formula cannot be used but if someone know how to transform it into others way you are most welcome.

formula 0 :(tbl.condition) = "0" then (tbl.time, tbl.floor)

formula 1 :(tbl.condition) = "1" then (tbl.time, tbl.floor)

condition 0 - condition 1

Former Member

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Report Inappropriate Content

03-25-2008
1:43 PM

Post Author: pandabear

CA Forum: Formula

Hi Alex,

I think V361 might be right. Create the formula's as he said and then

use the results to plug into the data section of your chart.

Former Member

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Report Inappropriate Content

03-25-2008
8:03 AM

Post Author: alexander_tze

CA Forum: Formula

hi,

Thanks for the tips, but i dont think that is the solution for this problem. any other ideas? i just want to create a chart only. Actuall the chart will be look base on below charting format

on change of " floor, condition"

show " time" <----actually this is the result after the calculation.(Time with condition "0" substract by Time with condition "1").

i was stuck here. wish you guys can help.

Former Member

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Report Inappropriate Content

03-24-2008
6:13 PM

Post Author: V361

CA Forum: Formula

Create your groups, then in the group footer, put a formula (using whatever your time stamp name is.)

Maximum Minimum

you can then use another formula to subtract your minimum from the max. you could also just use this as one formula

Maximum - Minimum, you should be able to use the formula result in your graph.

Former Member

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Report Inappropriate Content

03-22-2008
2:22 AM

Post Author: alexander_tze

CA Forum: Formula

Hi there,

Thanks for the tips, but i'm not clear with your information. Could you please tell me more detail regarding that calculation formula...and one more thing, the result for this calculation actually will be used to create a chart only.

The chart will be based on count of time(after the calculation) by condition and floor.

Former Member

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Report Inappropriate Content

03-21-2008
4:06 PM

Post Author: V361

CA Forum: Formula

I don't have 2008, but you should be able to group by condition then by floor, you can do a maximum time formula, and a minimum time formula, and then do the subtraction based on those.... that should work.

Ask a Question

Related Content

- Carry Forward - deletes the first opening month - SAC in Technology Q&A
- SAC - Using dynamic time calculations in Exception Aggregation is not supported. in Technology Q&A
- Model - If date or timestamp of a dimension is empty insert current date or timestamp in Technology Q&A
- Different Optimizer in Deep learning and when it need to be used? in Technology Blogs by Members
- A Complete Guide to Comparing Versions in SAP Analytics Cloud in Technology Blogs by SAP

Top Q&A Solution Author

User | Count |
---|---|

99 | |

6 | |

6 | |

6 | |

5 | |

5 | |

4 | |

4 | |

4 | |

4 |

You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.