how to use runningSum in AWS QuickSight - amazon-quicksight

I am encountering the following error when running clearting a calculated field: runningSum(sum(user_count),[date_created ASC],[]) to get the running total of created
I have tried to add the '{}' on the fields, and no luck.
How can I get this calculated field to work and give me the running totals

I was able to find an answer to this. I did it the following way:
runningSum(sum({count}), [truncDate("MM",{creationdate}) ASC], [{region}])
and I found an interesting catch.... whenever I tried adding at the moment that I'm configuring the data source, it'd fail.
So I went through and added the calculated field on the area where I can edit the visuals - and there it worked.
Here's my end result
Hope it works for you.

Related

Sets Not Showing "In" Function Tableau Public

When trying to create a set using tableau public, I create the parameter with no problem but when I try to create the set, not only does it create the set in the dimension category instead of a separate sets category for some reason, it doesn't show an "In" option in the filter, only an "Out". Also yes I know you are supposed to have the set in the "Filters" section, but I was just trying other stuff to see if I could get it to work.
I have tried everything I can think of however I cannot get the "In" option to appear in the sets filter. I have also tried googling my problem and cannot find a single instance of someone experience the same problem that I am now. If anyone could provide some assistance as to why this may be that would be great.

Putting groovy gorm code in config file error?

I am using this, Saving-User-last-login-Time-in-Grails, simple tutorial to add lastLoginTime to User. So, everytime a user logs in, the last signed in date/time is saved to database. I followed the steps, provided in the tutorial, exactly. But end-up getting this error.
No signature of method: groovy.util.ConfigObject.withTransaction() is
applicable for argument types: (Config$_run_closure3_closure11)
values: [Config$_run_closure3_closure11#12fab25]
Looks like the Gorm code, in Config.groovy file, is not respected. Does anyone know, where else should I move the code to solve this problem?
Any help is much appreciated. Thanks.
Try application.groovy, instead. For details, refer registeringCallbackClosures.
For more insight, and other approaches to achieve similar behaviour, see Events.

Deleting labels in Prometheus

I'm using Prometheus to do some monitoring but I can't seem to find a way to delete labels I no longer want. I tried using the DELETE /api/v1/series endpoint but it doesn't remove it from the dropdown list on the main Prometheus Graph page. Is there a way to remove them from the dropdown without restarting from scratch?
Thanks
This happens to me also, try to include the metric name when querying for labels' values like this:
label_values(node_load1, instance)
ref: http://docs.grafana.org/features/datasources/prometheus/
If you delete every relevant timeseries then it should no longer be returned. If this is not the case, please file a bug.
Prometheus doesn't provide the ability to delete particular labels, because this may result to duplicate time series with identical labelsets. For example, suppose Prometheus contains the following time series:
http_requests_total{instance="host1",job="foobar"}
http_requests_total{instance="host2",job="foobar"}
If instance label is removed, then these two time series will become identical:
http_requests_total{job="foobar"}
http_requests_total{job="foobar"}
Now neither Prometheus nor user can differentiate these two time series.
Prometheus provides only the API for deleting time series matching the given series selector - see these docs for details.

Creating Attribute set is taking time because of “initFromSkeleton”

I have written a script to create attribute set and attribute from csv and it worked fine on my localhost but after uploading it to server I found that it is taking so much time to do the job even with 1 entry. So I was debugging it and I found out that "initFromSkeleton" is taking time.
$entityTypeId = Mage::getModel('eav/entity')
->setType('catalog_product')
->getTypeId(); // 4 - Default
$newSet = Mage::getModel('eav/entity_attribute_set');
$newSet->setEntityTypeId($entityTypeId);
$newSet->setAttributeSetName($setName);
$newSet->save();
$newSet->initFromSkeleton($entityTypeId);
$newSet->save();
I don't know what to do because to build new attribute based on default attribute set I have to write this initFromSkeleton. While searching google I found this link. But it understood from there.
Could any one has done this before. Please help me out. Thanks in advance
Disable automatic updating of indexes to improve performance.Change the index update mode to manual.

CSV insert to database

This is not working as we discussed previously, for some reason and I have done is create some $vars for the uploaded file.
Code available here (Pastebin).
But never actually inserts anything
When doing a var_dump($csv_row) i get: bool(false)
var_dump($fh) shows: resource(89) of type (stream)
var_dump($insert_str) shows all 1700 records from the csv file (obviously too big to post on here)
So I’m guessing the while statement or the whole from if statement is wrong somewhere. Really really would appreciate some help on this, I need to get it working by tomorrow (monday)
You seem to be using the codeigniter database library wrong. I can see a
$this->db->set($insert_str);
but no $this->db->insert() to be found. The set() method only useful with an update() or insert() following it, See the docs, search for $this->db->set().
You either want to use the $this->db->insert_batch() (on the same doc page, unfortunately no direct links for sections) form and build up an array of arrays with your records (so you won't have to create a long sql string either).
Or you can use the $this->db->query() and just feed the $insert_str to it where you now call $this->db->set().
According to your question:
var_dump($insert_str) shows all 1700 records from the csv file
So i would rule out the possibility of the while loop or the if not working.
Put this code at the top of the controller or before reading csv file
ini_set('auto_detect_line_endings', true);
Check if this will work for you

Resources