DC.js exclude part of data from a chart - dc.js

I am a real newbie to d3 and js. I am trying to present the total of our "live" orders on a pie chart.
The csv I am using includes all orders, completed too, and I would like to exclude the completed orders from the pie. I do not want to delete them from the csv because the file is the data source for other graphs that will need those values later on.
I tried to use a filter in the dc.chart section like this
".filter([["Backlog","BAU","BAU Parked","Project Parked"]])"
but this way the Completed orders do appear greyed out.
Is there a way to exclude them altogether?

Related

Superset Chart Builds Not Including Configured Filters

I just started with Superset a week ago and this is my first post.
Using Docker for latest code of the master Superset build.
I'm frustrated that as I configure queries that have multiple variables when I save the chart with no query errors shown and the queries listed in the Filters options -- the resultant chart is not dispaying the queries themselves.
I tried Cases first but the SQL editor kept generating errors, so I watched how Superset by default built Filters and then created queries with Custom SQL that satisfied Superset.
Here is a Partial chart query that includes filter queries producing table columns My intention is to create a stacked bar chart with no time increments , just total number of matching table records --
GROUP BY collection_id,
altersgruppe,
story_ID,
art_interview,
story_collector,
form_interview,
stichwort,
geschlecht,
story_ort
ORDER BY `COUNT(collection_id)` DESC
LIMIT 1000) AS virtual_table
WHERE ((altersgruppe LIKE %’Baby-Boomer%’
OR altersgruppe LIKE ‘%Gen X%’
AND altersgruppe LIKE ‘%Gen Y%’
OR altersgruppe LIKE ‘%Gen Z%’)
AND (art_interview LIKE '%digital%'
OR art_interview LIKE '%persönlich%')
AND (form_interview LIKE '%Einzelinterview%'
OR form_interview LIKE '%Gruppeninterview%')
AND (stichwort LIKE '%Bestes Erlebnis%'
OR stichwort LIKE '%Schlechtestes Erlebnis%'
OR stichwort LIKE '%Überraschung%')
AND (geschlecht LIKE '%männlich%' OR geschlecht LIKE '%weiblich%' OR geschlecht LIKE '%divers%'))
LIMIT 10;
Yesterday I saw a reference to adding these filter displays manually in the code.
But I decided I'd better check in here first.
I'm using one table in a mysql environment and can provide more data when asked.
It is my hope that some users recognize some of the most likely issues with missing filters and can give me directions to investigate.
Otherwise I can post my total chart query and other settings that might help me get a solution.

SSRS Static fields in groups

Good afternoon!
I have created a report with the wizard to create a matrix that is grouped and has drill down rows. I have added filters to the rows and columns and it works great! I then copied that matrix and modified the filters, so I had two matrixes.
But what I really wanted was those two rows in the same matrix, just in different row groups. So I added another group, using the adjacent below option, and then added all the child groupings. However, when I run the report it shows the values for the first row of the drill down data.
When I look at the groupings I can see the one I did manually has a 'Static' field in each row grouping but the ones that the wizard did (with the red ?), they don't have that "extra" row:
What do I need to change or how do I need to add my groups so that I don't get that "static" row and not show the data? I have the visibility set to 'Hidden' and the toggle set up for the prior grouping set data.
Assuming a few things....
the data comes from a single dataset
You are differentiating between Property and Violent crimes by filtering on a column, I'll call it IncidentGroup for the sake of illustration..
I've understood your question ! :)
Get to the point where you had just a single tablix filtered to show 'Property crime'.
Now remove or edit that filter so it shows all the data you need in the report.
Finally, right click on your Matrix1_IncidentCategory row and add a parent group, choose IncidentGroup (or whatever the column is actually called) and check the box to add a group header.
That should be it, there is no need for a second tablix.
Without knowing how you are filtering currently it's hard to give a complete answer but this should get you close, if not all the way there.
If this doesn't work for whatever reason, please post sample data from your dataset output and your current filters.

Cognos: filter alternative?

I've defined a report in Cognos Report Studio.
I've also exposed this report in IBM BAM Business Spaces. I've used Report Viewer widget for that.
This widget allows end users to remove filters defined for the report. The data security is preserved (FGS applied), but they can access irrelevant data for specific report.
I would like to disable this (removing filters). Unfortunately this build-in widget is not allowing that.
As workaround I'm trying to use some other technique than filters to limit the data. I was trying to apply the filtering within the slicer.
My data is quite flat, and the data item I want to filter is not defined as dimension. That's probably the reason why it's not working for me.
I have a table with multiple columns.
My slicer definition:
filter([A_Events Query Subject].[ATracking_Events].[Status Code],
[A_Events Query Subject].[A_Events].[Status Code] = 'Q')
Anyway, all data (not filtered) are shown as a result.
Any idea how this can be solved?

datatables + adding a filter per column

How do I get the search/filter to work per column?
I am making small steps in building, and constantly adding to my data table, which is pretty dynamic at this stage. It basically builds a datatable based on the dat that is fed into it. I have now added the footer to act as a search/filter, but unfortunately this is where I have become stuck. I cannot get the filer part to work. Advice greatly appreciated.
here is my sample data tables that I am working on http://live.datatables.net/qociwesi/2/edit
It basically has dTableControl object that builds by table.
To build my table I need to call loadDataFromSocket which does the following:
//then I have this function for loading my data and creating my tables
//file is an array of objects
//formatFunc is a function that formats the data in the data table, and is stored in options for passing to the dTableControl for formatting the datatable - not using this in this example
//ch gets the keys from file[0] which will be the channel headers
//then I add the headers
//then I add the footers
//then I create the table
//then i build the rows using the correct values from file
//then I draw and this then draws all the row that were built
//now the tricky part of applying the search to each columns
So i have got this far but the search per column is not working. How do I get the search/filter to wrok per column?
Note this is a very basic working example that I have been working off: http://jsfiddle.net/HattrickNZ/t12w3a65/
You should use t1.oTable to access DataTables API, see updated example for demonstration.
Please compare your code with jsFiddle in your question, notice its simplicity and consider rewriting your code.

Filtering the output for importhtml in Google Sheets

I am building a google sheet to do calculations based on information I found on different websites and stumbled upon the IMPORTHTML function in Google Sheets.
Terrific, I want to import tables and then use some of the values out of those tables to build my sheet and make further calculations.
However, since the function retrieves both the headers and all the information in the table that makes it quite hard to work with. Instead I would like to pull only certain of the data, preferably specific cells in the table pulled.
Is this possible?
For example:
=ImportHtml("http://en.wikipedia.org/wiki/Demographics_of_India"; "table";3)
returns a huge list, what if I would like to pull only the values of B7 and D7? Is that possible? Even filtering out a single row would be useful, whatever that is more feasible. The most important part is that I can get a single row and dont have the full table.
Found the INDEX function, doing exactly what I need it to do!

Resources