I am trying to create an analysis in OBIEE. I am trying to get the total amount per customer. So 2 columns Customer and account balances.
A 111111
A -111111
A 32000000
Grand Total 32000000
So the total would be 32000000 is there a way of just showing the grand total, like in SQL? I have tried multiple different aggregate rules
Related
How can i calculate the needed size of the elasticsearch-node for my Shopware 6 instance when i known some KPIs.
For example:
KPI
Value
Customer
5.000
Products
10.000
SalesChannel
2
Languages
1
Categories
20
Is there a (rough) formula to calculate the number of documents or the required size of a node?
https://www.elastic.co/blog/benchmarking-and-sizing-your-elasticsearch-cluster-for-logs-and-metrics is relevant
however what you have provided there is only logical sizing of the data. you will need to figure out what this all means when you start putting documents into Elasticsearch
I'm a beginner in Power Query and I have some data that that I want to repeat for each end of month to show a running total.
I can get the running total every time there's a transaction but how do I show a running total by month even if there are no transactions in that month?
You can merge the original table to a date table. Since you can do a running total if you were to just use amounts of 0 on days where there was no data (Find and replace nulls with 0) then you should be golden from there.
I am trying group by date like following for total count
r.db('analytic').table('events').group([r.row('created_at').inTimezone("+08:00").year(), r.row('created_at').inTimezone("+08:00").month(),r.row('created_at').inTimezone("+08:00").day()]).count()
However, it slow and it took over 2 seconds for 17656 records.
Is there any way to get data faster for group by date ?
If you want to group and count all the records, it's going to have to read every record, so the speed will be determined mostly by your hardware rather than the specific query. If you only want one particular range of dates, you could get that much faster with an indexed between query.
I have to design Dashboard with data source in bigquery.
Dashboard should be giving 3 graphs and tables
Table- Total payments to purchase and date wise breakage.
Two row table/ pie chart basically showing the done payment and pending payment.
Last and the biggest one showing bar chart total sales and redeemed aggregated
a. Day wise for last 30 days
b. Week wise for last 12
c. Month wise for last 6
Now I want to ask about 3 really, not the UI, that was for completeness.
Design 1. Create date wise tables from joining the dumps of all the services and application tables ( we have microservices) as a schedule Job in merchant bff. And then use the query cache of bigquery. And bigger aggregate from those tables.
Design 2. Run the schedule Job but don't create date wise tables and load that data then in redis cache for front-end.
I am in kind of fix bent more toward Design 1. But have reasons and few doubts.
Assumption is that bigquery query cache is good and better than redis is it?
Still in Design 1 there will be two queries one load and one select, so is my choice wrong? And Design 2 is better?
Did I miss anything in Design 1 if it's the one I should pursue. One thing I kind of noticed while writing down the solution is I haven't taken into account merchant ID in the date table design schema.
Is redis unnecessary moving part/ complexity here.
My data is not PETA byte big data but I hope it will be.
We have a business requirement to show a cost summary for all our projects in a single table.
In order to tabulate these costs we have to query through all the client tasks, regions, job roles, pay rates, cost tables, deliverables, efforts, and hour records (client tasks are in the same table and tasks and regions are in the same table and deliverables, effort, and hours are stored as monthly totals).
Since I have to query all of this before I go for-looping through everything it hits a large number of scripting lines very quickly. Computationally it's like O(m * n * o * p) and some of our projects have all four variables that go up very quickly. My estimates for how to do this have ranged from 90 million lines of code to 600 billion.
Using batch apex we could break this up by task regions into 200 batches, but that would reduce the computational profile to (600 B / 200 ) = 3 billion lines of code (well above the salesforce limit.
We have been playing around with using informatica to do these massive calculations, but we have several problems including (1) our end users can not wait more than five or so minutes, but just transferring the data (90% of all records if all the projects got updated at once) would take 15 minutes over informatica or the web api (2) we have noticed these massive calculations need to happen in several places (changing a deliverable forecast value, creating an initial forecast, etc).
Is there a governor limit work around that will meet our requirements here (massive volume of data with response in 5 or so minutes? Is force.com a good platform for us to use here?
This is the way I've been doing it for a similar calculation:
An ERD would help, but have you considered doing this in smaller pieces and with reports in salesforce instead of custom code?
By smaller pieces I mean, use roll-up summary fields to get some totals higher in your tree of objects.
Or use apex triggers so as hours are entered the cost * hours is calculated and placed onto the time record, and then rolled-up to the deliverables.
Basically get your values calculated at the time the data is entered instead of having to run your calculations every time.
Then you can simply run a report that says show me all my projects and their total cost or total time because those total costs/times are stored/calculated already.
Roll-up summaries only work with master-detail
Triggers work anytime, but you'll want to account for insert, update as well as delete and undelete! Aggregate Functions will be your friend assuming that the trigger context has fewer than 50,000 records to aggregate - which I'd hope it does b/c if there are more than 50,000 time entries for a single deliverable that's a BIG deliverable :)
Hope that helps a bit?