Superset Chart Builds Not Including Configured Filters - filter

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.

Related

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?

Grafana Templating

I am wondering if there is a way to limit the number of rows generated from grafana templating.
I can have a drop down variable "$x"on my grafana page and I can select the row editor and say repeat row for every value under $x.
Based on different criteria, I can have x anywhere between 1 and like 160 rows. I need to only be looking at about 10 at a time. I am wondering if I can control the number of rows shown/change the rows shown somewhere in grafana.
I can manually select items from the $x drop down to show only a few items of course, but its a matter of selecting only say.. 10 items right when the page loads.
Please let me know if I am not describing the problem correctly or if I need to clarify more.
Thanks,
Karan
As far as I know there is no direct option for this but there are some ways you may be able to achieve what you want.
You could select your ~10 default entries and then save the dashboard this will save the selected ones in the dashboards JSON. (or modify the JSON of the dashboard directly)
You could use the regex field in the template settings to filter some of your values and split them in groups this way. (one variable per regex group)
You could change your data in elasticsearch in order to use multiple fields where you can split on.
see PR #5616 as #Daniel Lee mentioned
In general I think you get a faster response to this in grafana directly at github.

SSRS: How to add Calendar Dates in Columns (tsql)

I've got the needed query to extract what data I need, but I'm having issues on how to manipulate them in Visual Studio 2008 and/or Report Builder 3.0.
I want to add the calendar days of the month as a column horizontally in SSRS and I've tried many different ways but still unable to accomplish what I need.
Here's basically what I'm trying to accomplish. Any help would be greatly appreciated:
Modify your original dataset query to include an right outer join to a dimension table, linking your completion date to a date field within your dimension table, for example your sql query should include something like:
FROM tbl_referrals RIGHT OUTER JOIN
Dim ON tbl_referrals.AdmitDate = Dim.Date
and then use dim.date as column group.
If your dimension table also includes years,months these can further filtered accordingly to the days of the months you require.

How to apply parent group for multiple datasets in SSRS VS2008

I have been battling this issue for days without success. I have a very tricky format of a report i need to achieve but the main thing is that all the datasets will need to be grouped by 1 parent. I'll attempt to explain...
Say we have dataset1, dataset2. Both have AccountNumber as common field(parent).
I need both datasets to be used in the format/layout of the report but grouped together by AccountNumber, something like this.
[Report Header Data]
[AccountNumber Group]
Dataset1
Dataset2
[end AccountNumber Group]
What is the best way to achieve this? The format of the report has been a major road block on grouping thus making me split the data into multiple datasets, group all them together by accountnumber and then create a custom format per dataset in the report. The flow of the report may be something like this
[Report Header Data]
[AccountNumber Group]
[tablix1]
Dataset1
[tablix1]
[tablix2]
Dataset2
[tablix2]
[end AccountNumber Group]
Looking forward to the discussion on this!
There are multiple ways to achieve this effect, and the best for your situation depends on the details of your report. So I'll just give some of the techniques I've used in the past:
Join the two datasets into one
Joining the datasets into one in your query is one of the simplest answers, and works across all versions of SSRS. It can make the SQL queries large, but it makes report layout simple.
Use the Lookup(...) function
SSRS 2008R2 added the Lookup(...) function, which can be used to access items in a second dataset. It's a little bit awkward to use, and requires a separate formula for every field to be accessed, but it is very powerful for retrieving a few fields from a different dataset.
Sub reports
Similar to the approach descibed in the original question, This lets you create a parent project with one tablix, and then place a subreport within. The subreport will be called multiple times, with the Grouping item as a parameter. Each run of the report should only return the report for that instance of the group. This can be very powerful, but maintenance is difficult: you have two places to change some thingss, and it can require manual tweaking to make sure columns line up correctly. The subreport will often be the fastest report to run, since it is getting called many times.
[NB: StackOverflow.com isn't the best place for discussions. The design of the site is set up to avoid discussion and aim towards question & answers, not discussion.]
I don't know if there's a perfect solution here.
Based on your description, (and it sounds like you're leaning in this direction already) you'll need a Dataset for each distinct AccountNumber, and create a new list or table based on this.
Once you have this set up you need to embed the different Dataset objects (i.e. tablix1, tablix2) in each row.
The main issue here is that you can't use multiple Datasets when embedding tablixes within tablixes, so this makes me think that you may need a subreport solution - this way the subreports can take an AccountNumber parameter and each use a different Dataset.
So something like:
[Report Header Data]
[AccountNumber Group]
[subreport1]
[tablix1]
Dataset1
[tablix1]
[subreport1]
[subreport2]
[tablix2]
Dataset2
[tablix2]
[subreport2]
[end AccountNumber Group]
This will repeat for each AccountNumber as required.
It's tough to say without knowing exactly what your data looks like, but in 2008R2 and above you can use Lookup and LookupSet to join Datasets, but that will be cumbersome for multiple values, even if you are running the correct edition.
Again, depending on your data, another option is adjacent groups, if you can manage to get the data in one Dataset... This would allow to have different groupings next to another under the AccountName group, but it's a long shot.
It would be great if we know the report data e.g Payslip, payslip with loan balance (ie Dataset 1 for payslip and Dataset 2 for loan).
Anyway, the format will depend on the required output of the report. i.e If your planning on produce calculation like sum in the report and if the result output will be per Dataset or for both dataset.
Assuming you will need sum calculations, if the calculation result will be per dataset, then option 2 is good, if the calculation result is for total (Dataset 1 + Dataset 2) then option 1 is better.
If no calculations or total result is required, either will do.

Filtering Quotes by InventTable

I'm trying to build a report in AX 2009 (SP1, currently rollup 6) with a primary data source of the SalesQuotationLine table. Due to how our inventory is structured, I need to apply a filter that shows only certain categories of items (in this case, non-service items as defined in the InventTable). However, it seems that there is a problem in the link between the SalesQuotationLine and InventTable such that only two specific items will ever display.
We have tested this against the Sales Quotation Details screen as well, with the same results. Executing a query such as this:
...will only show quotes that have one of the specific items mentioned earlier. If we change the Item Type to something else (for example to Item), the result is an empty set. We are also getting this issue on one of our secondary test servers, which for all intents is a fresh install.
There doesn't seem to be any issues with the data mapping from the one table to the other, and we are not experiencing this issue with any other table set. Is this a real issue, or am I just missing something?
After analyzing the results from a SQL Profile run during the execution of the query, it seems the issue was a system bug. When selecting a table to join to the SalesQuotationLines, you have two options: 'Items' and 'Items (Item Number)'. Regardless of which table you select the query executes with, it joins the InventTable with the relation "SalesQuotationLines.ProjTransCode = InventTable.ItemId".
After comparing the table to other layers in the system, I found the following block of code removed from the createLine method (in the SYP layer):
if (this.ProjTransType == QuotationProjTransType::Item)
{
this.ProjTransCode = this.ItemId;
}
Since the ProjTransCode is no longer being populated, the join does not work except on certain quote lines that do have the ProjTransCode populated.
In addition, there is no directly defined relation to the InventTable - the link is only maintained via an Extended Data Type that is used on the SalesQuotationLine.ItemId field. Adding this relation in manually solved the problem.

Resources