How to make sum of column value ? in parse - parse-platform

I just wanted to know is there a feature in parse to get the SUM of the column value. I read in the link https://www.parse.com/questions/how-to-make-sum-of-column-value that this feature is not supported through query we need to use cloud code. Is this the same till now? Any updates on this?

Related

Google Sheets: Get First Value in Column

I need to find the first value in a column range. I've previously had help to find the last value in a column range, such as:
=INDEX(E4:E188, MATCH(999^99, (E4:E188)))
However I haven't figured out how to convert the above formula to return the first value instead. Any suggestions would be appreciated.
Although I'm not sure whether I could correctly understand your expected result, how about the following sample formula?
Sample formula:
=INDEX(FILTER(E4:E188,E4:E188),1)
Testing:
Reference
FILTER

elasticsearch fill gaps with previous value

I have time series data in Elasticsearch and I want to aggregate it to create histogram. What I want to achieve is to fill the null buckets with the value of the previous data point. I know that I can use min_doc_count: 0 but it will put the value as 0 and I couldn't find any out of the box way to do this via Elastic. May be there is some trick that I am not aware of?
Appreciate your feedback.
I think the Date Histogram Aggregation does not provide a native way to perform what you would like.
The closest thing I can think of is using missing value. However, this will set a static value to all the dates where no values are found, which is not exactly what you want.
I also thought of using Painless with the following logic:
Get the first value in the Histogram and store it in a variable current.
If the next value is different to 0, store this value to current.
If the value is 0, set the current value to the histogram date. Don't change current.
Repeat step 2 until you finish the Histogram.
Using painless, in my experience is really painful but you can consider it as an alternative.
Additionally, I would recommend you to limit ES to perform searches and aggregations. If you require additional logic to the output, consider performing it outside ES. You can use the Python ES Client for instance.
I can think of the following script with a similar logic as the Painless scenario:
current = 0
results = es.search(...)
for i in res["aggregations"]["my_histogram_name"]["buckets"]:
if not i["doc_count"]: #this is the same as "if i["doc_count"]==0"
i["doc_count"] = current
current = i["doc_count"] #changed or not, we always use the last value to current
After that, the histogram should look as you want and ready to be displayed.
Hope this is helpful! :)

How to filter one column using other in obiee?

I use OracleBI 12c. We had to create a analysis. Let's say we need to show all the clients with account code starting with '202%' and at the same time we should check if that client also has account_code starting with '226%' . If they have then show them, else don't.
It may sound simple, but all filter options I tried didn't give the wanted output. Also I tried to use selection steps but didn't succeed either.I could have done that using FILTER in Column formula, but since the column is not a measure attribute it throws error 'Filter funciton requires at least one measure attribute in its first argument'.
Have somebody had this kind of issue?

Distinct count a field that has been sorted by territory from another source

I am trying to find a way to get a distinct count on a field that is being filtered by a territory without using grouping because of the fact that I need to then pass this value over to another report. The easiest way would be something like this:
distinctcount({Comm_Link.CmLi_Comm_CompanyId}) if {Company.Comp_Territory}='Atlanta'
But for obvious reasons that won't work. Any thoughts?
what you have to do is a running total. Right click on {Comm_Link.CmLi_Comm_CompanyId} insert running total, type of summary will be distinct count and on evaluate where says Use a formula type your condition {Company.Comp_Territory}="Atlanta"
your formula and approach is wrong.. I doubt whether your formula compiled with out any errors...
first create the value and then find the distinct count
if {Company.Comp_Territory}='Atlanta'
Then {Comm_Link.CmLi_Comm_CompanyId}
Now in footer write or you can get it by right click on the filed.
distinctcount({Comm_Link.CmLi_Comm_CompanyId})

Get maximum value with Zend_Db_Table

Ive got a Zend_Db_Table
Now I want to get the maximum available value of a field.
Is there a way to get the MAX(number) value or do I need to use basic SQL?
Thanks!
Use
new Zend_Db_Expr('MAX(number)')
as one of the fields in the Zend_Db_Table_Select.

Resources