Trend chart in Qlik Sense not changing on user selections after applying set analysis on the trend chart - qlikview

I have a trend chart in Qlik Sense where I have applied the following condition to filter the data :
avg({$<DATA_SUBJECT_NAME={'CALL','ACCOUNT','IDENTITY','FINANCIALTRANSACTIONS','HOUSEHOLD','FLOWS','INTERACTIONS'}>}HEALTH_KPI_NUM)
The chart is displayed perfectly but when I make other selections on the sheet the chart remains unaffected. Where am I going wrong?

Exactly as Stefan said. If you are selecting in the field that you have already applied set analysis to there will be no change as the set analysis will override the selections. You can try this if you want the selections to be honoured
avg({$<DATA_SUBJECT_NAME*={'CALL','ACCOUNT','IDENTITY','FINANCIALTRANSACTIONS','HOUSEHOLD','FLOWS','INTERACTIONS'}>}HEALTH_KPI_NUM)
The only change is to add *= this says the set analysis should be the intersection of the actual selection and the provided list

Related

How contact sql with tableau so that if there was a mistake in report he marked it as red?

Suppose i have data source for tableau to perform report.
dbo.myreport
Also i check is the value(s) right or wrong?
Let me provide picture to be more clear
i create query that check is the value(s) right or wrong. For example 6,6 is wrong and in dbo.checkmyreport i have structure
date;variable;value;right-wrong
07.05.2021;x1;6,6;wrong
how to do to if value from dbo.checkmyreport marked is wrong then it must automatically must be marked as red in tableau report.
Is there possible?
I'm assuming that you have already added this data into Tableau and kept the column names as such right? And you have already created the desired bar chart.
In Tableau add the "right-wrong" dimension to the Color marks and set the colors as appropriate. That should let you color all the bars that are labelled as "wrong" in a specific color.

Use conditional statements to add data to scatterplot

I am new to VBA and have not had experience with creating many charts.The chart has to be created by hand because the data has to be visually inspected to see if it meets certain criteria, and not every cell in a column needs to be added to the chart. The chart is to show information for each asset. Not every asset will have information that can be entered on the graph. Is there a way to use VBA to conditionally add data points to a graph?
For example if an asset sees values between 0-30 plot a dot (green) 30-50 (red) etc.
Such a scenario can be achieved with data layout and formulas. No need for VBA, which would need to be re-run, where as formulas will update automatically.
Consider the following screenshot:
The formula in cell C3 is =IF($B3<30,$B3,NA()) and in D3 =IF($B3>=30,$B3,NA()) copied down.

Qlikview Expression to get Average in comparison to selected criteria for Chart

I am trying to create a chart that displays the average of a parameter of an entire category. The problem is that in sheet 1,2,3,4, etc, the charts I have reflect one parameter, so when I go to compare this parameter to the average in my new sheet, I only get the average of the fields that have been selected in prior sheets. I want it so that I can create a new chart with one bar as an average of the entire population, and another bar in the same chart that depicts the average of the selected parameter(s). Ideally, I would have two dimensions/x axis categories, one for the selected criteria, and one for average of all categories. Can someone help?
Thanks.
I believe the way to handle this is with set analysis. You can create one expression with the normal avg(parameter) and another expression with some embedded set analysis. See example below.
Expression1: avg(parameter) // will agregate everything in the current selection
Expression2: avg({1<category='YourCategory'>}parameter) // will aggregate everything in a category that you set in the set analysis syntax.
With some more specific info I would be able to get you an actual expression, but hopefully this helps.
EDIT
Updated to reflect new information provided in the comments.
Expression1: avg(parameter)
Expression2: avg({1}parameter)
In set analysis syntax the {1} means the entire universe of data where as {$} is your current selection. In other words, 1 is your data with nothing selected. In my first example above, the {1<category='YourCategory'>} statement uses a modifier signified by the <> so that you would be performing the aggregation over the entire universe with only the value specified in YourCategory selected.
So if the scenario is that you have currently selected let's say, 5 zip codes, your current selection ({$}) would be those 5 zip codes and the entire universe ({1}) will be as if you selected no zip codes. Therefore comparing those two populations side-by-side in two Expressions should give you the comparison you want.
Caveat: Using the {1} syntax in your expression means that your average of "all zip codes" will always be the average with nothing selected unless you put something in the modifier as in my first example. See this more detailed explanation.

bind Data table to chart in vb

I have a project that im working on at the moment in VB.
Basically I have a Data Table in VB it populates with 4 columns and a variable number of rows, the column names are as follows;
Gear, RPM, Speed, CO2
The data table appears in datagridview correctly but that's as far as I have gotten :/
What I am trying to do is to make a line chart called mainGraph to draw a graph based on these results, I'm getting stuck when trying to populate the chart.
ANY thoughts would be really appreciated.
I am guessing you are using the ms chart controls and not some 3rd party like Telerik.
This should be usefull http://blogs.msdn.com/b/alexgor/archive/2009/02/21/data-binding-ms-chart-control.aspx
Also, there is source code found at http://archive.msdn.microsoft.com/mschart/Release/ProjectReleases.aspx?ReleaseId=4418
in short this is a way to get things displayed
mainGraph.Series(0).ChartType = DataVisualization.Charting.SeriesChartType.Line
mainGraph.Series(0).Points.DataBind(yourDataTable.DefaultView, "Speed", yourDataTable.DefaultView, "Gear")
These commands should make a line graph with Speed on your x axis, and Gear on your Y. Assigned to "Series(0)"
To add more columns, you need to add more "Series"
mainGraph.Series.Add("RPM")
Do some thinking about how you want this data displayed.
how would you like to set this graph up?
I'm assuming you would want a line graph?
What is going to be the X axis? Is there a missing column that needs to be "time" in the data table?
do you want them all on one graph/chart area?
If you would like more charts, then you need to add chart areas. A series can be assigned to a chart area.
Hopefully this helps.

Qlikview V10.4 Threshold and Drill down issue

I am using Qlikveiw version 10.4. I am trying to apply a threshold to Sales amounts in a table chart. Meaning, I want to display Sales above the threshold amount entered in the input box. But also keep the dimensionality of the drill down for the following drill down dimensions... Product Name>Category Name>Supplier Name. LineSalesAmount is an expression.
So I have a chart table...
Product Drilldown group as my dimensions
LineSalesAmount (expression)
Apparently in QV v11, there is a new feature added to the chart wizard called dimension limits but how do I apply this same functionality in QV 10.4?
You should be able to achieve this using set analysis.
If you create a variable called MinSalesAmount and add that to an input box, you should then be able to filter the data in the chart by using a set analysis expression like this:
SUM({<LineSalesAmount={'>$(=MinSalesAmount)'}>} LineSalesAmount)
The chart will then only display records where the LineSalesAmount is greater than the value entered in the Input Box which is mapped to the MinSalesAmount variable.
You can find extensive information on "Set Analysis" in the Qlikview Reference Manual (QlikView Reference Manual.pdf) and the online help within Qlikview.