Announcements
You can succeed best and quickest by helping others to succeed. Join the conversation.
cancel
Showing results for
Did you mean:
Partner - Contributor III

## Set analysis in an Interval expression

Good morning,

I do have a QV app where I display the number of items for "yesterday", using the following expression that works perfectly:

=count({<CreationDate= {'>=\$(=DayStart(today()-1))<\$(=DayStart(today()))'}, Itemtype={'1'}>} [Item Number])

I the same app, I am displaying the average time required to create each item, using the following:

=Interval(avg(ProcessEnd-ProcessStart),'hh:mm:ss')

Now, I have the following request from my colleagues: Can we get a gauge that shows only the average processing time for each item made yesterday. My guess is that I somehow have to match both expressions... But I have no clue how to do it?

Can someone provide information on that?

Thanks!

1 Solution

Accepted Solutions
MVP

May be you need to add the same set analysis to your avg expression

=Interval(Avg({<CreationDate= {'>=\$(=DayStart(today()-1))<\$(=DayStart(today()))'}, Itemtype={'1'}>} ProcessEnd-ProcessStart),'hh:mm:ss')

8 Replies
MVP

May be you need to add the same set analysis to your avg expression

=Interval(Avg({<CreationDate= {'>=\$(=DayStart(today()-1))<\$(=DayStart(today()))'}, Itemtype={'1'}>} ProcessEnd-ProcessStart),'hh:mm:ss')

Partner - Contributor III
Author

Thanks Sunny,

This expression works, but it returns the exact same value as the average one I use, as if the set analysis was not "working" (i.e. not affecting the data selection).

Nic

MVP

Are you sure that this same set analysis expression works within the other expression that you shared above?

Partner - Contributor III
Author

You mean this one: =count({<CreationDate= {'>=\$(=DayStart(today()-1))<\$(=DayStart(today()))'}, Itemtype={'1'}>} [Item Number]) ? Yes, it does work and it provides accurate data on a daily basis.

MVP

Would it be possible for you to share a sample or sample data with the expected output from the sample you share?

Partner - Contributor III
Author

Ok,

I just made the example you've requested using the exact same data as my original app and your expression, but this time it works and shows data correctly.

I don't get it!

MVP

Creation date is a timestamp field? Are you sure your first expression worked? Because if the set analysis worked for the 1st one... it should work for the second time... if it didn't work for the first time... it could be because of the creation date set analysis?

Partner - Contributor III
Author

Got it to work...

Replaced the gauge from the initial app by the one I created for you and BAM! it worked!

You rock, thanks for your time!

Community Browser