cancel
Showing results for 
Search instead for 
Did you mean: 

How compare date times from different queries.

0 Kudos

Good afternoon:

I have two queries. on first, I have a values of fuel rate by second of many equipment. in second query, I have diferent ranges of time by equipment.

I want get sum of fuel rate between any range of time.

I merge variables Equipo1/Equipo2, and FECHA1/FECHA2. But I can´t compare date times, and calculate the sum. I tried with this formula but it don't works. appears message #INCOMPATIBLE:

sum fuel rate = sum ([fuel rate] where ( [tiempo]>[INICIO] and [tiempo]<[FIN])

please, could you help me?

thanks

Diego

former_member30
Community Manager
Community Manager
0 Kudos

Hi and welcome to the SAP Community!

Thank you for visiting SAP Community to get answers to your questions. Since you're asking a question here for the first time, I recommend that you familiarize yourself with https://community.sap.com/resources/questions-and-answers (if you haven't already), as it provides tips for preparing questions that draw responses from our members.

Should you wish, you can revise your question by selecting Actions, then Edit (although once someone answers your question, you'll lose the ability to edit the question -- but if that happens, you can leave more details in a comment).

Finally, if you're hoping to connect with readers, please consider adding a picture to your profile. Here's how you do it: https://www.youtube.com/watch?v=F5JdUbyjfMA&list=PLpQebylHrdh5s3gwy-h6RtymfDpoz3vDS. By personalizing your profile with a photo of you, you encourage readers to respond.

Cheers,

Julia
SAP Community Moderator

TammyPowlas
Active Contributor

Hi Diego,

Thank you for your question

Which reporting tool are you using? I am guessing Web Intelligence, so I have updated your tag.

0 Kudos

Good morning:

Yes. I am using SAP BusinessObjects - Web Intelligence (WebI). Also, I upload my photo. I'm going to wait responses from colleagues

thank you

Diego Málaga

nscheaffer
Active Contributor

Do you know what version of BusinessObjects you are using?

0 Kudos

Good morning:

I'm using this version.

thank you

Diego

Accepted Solutions (0)

Answers (2)

Answers (2)

0 Kudos

Good morning Noel:

Thank you very much for your responce. But I can't get this sum , yet. I followed your instruction.I generated new two variables like detail variable, with the Equipo1/Equipo2 merged variable as associated dimension. after, I used your formula of sum, but appears message #CONTEXT.

Also I read TIP1 for the blog. Excellent info.

To comment the query 1 (Equipo 1, FECHA1,...) is from a excel file.

Also, I merged FECHA1/fecha2. and I get the same message #CONTEXT. (instead of 170)

I made this table with Equipo2/Equipo2; FECHA1/fECHA2; INICIO; FIN, SUM FUEL RATE

Please, could you know what more I do?

thank you

Diego

nscheaffer
Active Contributor
0 Kudos

I would recommend creating detail variable with the merged parent of Equipo1/Equipo2 as the Associated dimension.

If find "Tip 1" this blog post helpful in explaining the reasoning as to why this approach is necessary.

Then use those variables in your sum fuel rate calculation...

=sum([fuel rate] where([tiempo]>[INICIO Detail Var] 
 and [tiempo]<[FIN Detail Var])

Does that work for you?