how to create graphics in Quicksight without aggregations - amazon-quicksight

I'm new to Quicksight, I want to make a simple graph with "time" on the X axis and "Pm" (int) on the Y axis.
I take "time" and drag it to the X axis, then I drag "Pm" to Value, but here Pm (Sum) appears with "Aggregate" and I only need the value of Pm. which is recorded every 5 minutes.
How can I do this to solve this?
Or where can I find an example or tutorial?
It is an IoT application, the devices send sensor data to aws IoT Core => IoT Analytics => Quicksight.

Do you want to render the data as a line chart, scatter plot or something else?
It is worth noting that QuickSight doesn't know how your data is recorded and it needs to know what to do if there are 2, 3 or even more rows with the same "time" value. If you know that you should not have more than a single row with the same time, then the fact that QuickSight is doing any aggregation should not matter.
In situations where you might have more than 1 row with a single value, you might want to use Average, Max or Min to aggregate the values (this really depends on the data you are using in the chart and what information is important for you).
To be able to render every single record in QuickSight, you need to add a field that is unique (such as a record id).

Related

How can I sort the date in the X axis properly on a Bar Chart in Kibana?

I'm trying to order the date ascendantly in the X axis of the chart. And I've set it up that way here:
However, this happens:
Is there a way to work around this? 25 January should be the last bar. I've tried changing data formats to see if it would order properly but with no success.
You haven't specified how you are generating this graph, but it looks like you've done a Terms aggregation on the date field. The order by you are showing is then for the terms count. If you look right above that, it probably says order by: Metric count. What you want it to say is Order by: term.
In any event, in general, you don't want to aggregate by date like that. Instead choose a Date Histogram aggregation. That will allow the time filter/aggregation bucket size to be changed.

How to aggregate data between two filters in Kibana?

I have two filters transfer* and transfer_failures. Each filter is the output of a database query using ES DB queries. I need to visualize a graph that aggregate monthly the number of transfer_failures/total transfers in the month.
Both have timestamp created field with the same format, but I wanna know how to plot table that uses two filters!
So suppose I have 40 total transfers on May 'should be calculated using the transfer* filter' and 10 transfer_failures 'should be calculated by the transfer_failure* filter' so the graph should blot 10/40=.25 on May supposing building a Vertical Bar.
I've some screenshots to show, but I am not allowed to post these here.
You can use the filter ratio aggregation on Visualize -> TSVB/Time Series Visual Builder if you want to calculate percentages using two filters.

PowerBI groupby with filters

My company has tasked with slicing the information on turnover and to create different graphs.
My source data looks like this: Relevant columns are: Voluntary/Involuntary, Termination Reason, Country, Production, and TermDateKey
I am trying to get counts using different filters on the data. I managed to get the basic monthly total using the formula:
Term Month Count = GROUPBY('Turnover Source','Turnover Source'[TermDateKey],"Turnover Total Count", COUNTX(CURRENTGROUP(),'Turnover Source'[TermDateKey]))
This gave me a new sheet with the counts for each month.
Table that shows TermDateKey on Column 1, and Counts on column 2
I am trying to add onto this table by adding counts but using different filters.
For example, I am trying to add another column that gives me the monthly count but filtered for 'Turnover Source'[Voluntary/Involuntary]=="Voluntary". Then another column for 'Turnover Source'[Voluntary/Involuntary]=="Involuntary" and so on. I have not found anywhere that shows me how to do this and when I add in the FILTER function it says that GROUPBY(...) can only work on CURRENTGROUP().
Can some one point me to a resource that will give me the solution I need? I am at a loss, thank you all.
It looks like you may not be aware that you don't have to calculate all possible groupings with DAX formulas.
The very nature of Power BI is that you use a column like "Termination Reason" on an X axis or in the legend of a visual. Any measure that you have created on values of another column, for e.g. a count of all rows, will then automatically be calculated to be grouped by the values in "Termination Reason", giving you a count of each of the values in the column.
You do NOT need DAX functions to calculate the grouping values for each measure for each column value combination.
Here is some simple sample data that has been grouped into dates and colours, one chart showing a count of each colour and one chart showing a sum of the Value column. No DAX was written for that.
If your scenario is different, please explain.

How can I get the values in the Matrix on my SSRS report to repeat?

I know there must be a simple answer to this, but I can't find it.
I have added a couple of textboxes to a Matrix in a BIDS/SSRS report. I've given these textboxes values such as:
=Fields!WEEK1USAGE.Value
It works (after a fashion); when I run the report (either on the Preview tab, or on the Report Server site) I see the first corresponding data value on the report - but only one.
I would think that once a value has been assigned via expressions such as "=Fields!WEEK1USAGE.Value", each value would display (rows would automatically be added).
There must be some property on the Matrix or the textbox that specified this, but I can't see what it might be.
Here is how my report looks (very minimalistic, so far) in the Layout pane:
...and after running, on the Preview tab:
Obviously, I want the report to display as many rows as necessary, not just one. The textboxes do have a "RepeatWith" property, but there description doesn't sound interesting/useful/promising.
I don't see any property on the Matrix control that looks right, either.
I thought maybe the designer was only showing one row of values, and ran the report on the server, too, but there also it just shows the two values.
So what do I need to do to get all the data for a provided field?
Matrices are for display of grouped data and summary information, usually in a horizontally expanding pivot table type of format. Is a matrix really what you are after? Looking at your expression you have =Fields!Week1Usage.Value but in a matrix what I expect to see would be at least =Sum(Fields!Week1Usage.Value) or even better just =Sum(Fields!Usage.Value). Then you would have ProactDescription as your row group and the week as your column group and it would all just work out everything for you, grouping and summing by Proact vertically and expanding the weeks out horizontally.
What seems to be happening is that you have no grouping on rows or columns and no aggregation so it is falling back to the default display which is effectively the First function - it displays the first row of data and as far as the matrix is concerned it has done its job because there is no grouping.
Without knowing your problem or data, I'll make up a scenario that might be what you are doing and discuss how the matrix does the heavy lifting to solve that problem. Let's say you have usage data for multiple Proacts. Each time one is used you record the usage amount and the date and time it is used. It could be used multiple times per day but certainly multiple times in a week. So you might be able to get the times each Proact is used from a table like so:
SELECT ProactDescription, TimeUsed, Usage
FROM ProactUsage
ORDER BY ProactDescription, TimeUsed
In your report you want to show the total weekly usage for each Proact over multiple weeks. Something like this:
Proact Week1 Week2 Week3 ...
Description Usage Usage Usage ...
--------------------------------------------
Anise, Fennel 1 CT 20.00 22.50 16.35 ...
St John's Wort 15.20 33.90 28.25 ...
...
and so on. Using a dataset based on the SQL above we create a matrix and in the row group properties we group on =Fields!ProactDescription.Value and in the column group properties we group on a week expression like =DateDiff(DateInterval.Week, Fields!TimeUsed.Value, Today) and then in the intersection of the row and column we put =Sum(Fields!Usage.Value). To display the header of the column nicely put an expression like
="Week " & DateDiff(DateInterval.Week, Fields!TimeUsed.Value, Today)
The matrix automatically does all the summing by week and product and expands the weeks horizontally for as many as you are reporting. For bonus points you can also put totaling at the end of the columns and the rows to show the total use of that Proact for the period (row total) and total use of all Proacts in that week (column total).

Tableau calculated-field filter on pie-chart doesn't work

Based on previous question, I had to create calculated value for Location, and use that as quick filter, i.e.
Location Filter:
LOOKUP(ATTR([Location (Loc)]),0)
Workbook is on Public Tableau
For hovering over points in a map, the calculated field works, but when I create pie chart, it doesn't work.
For instance, if I select All, this is the result
And if I select a business from Location Filter, this is what I get
How to troubleshoot?
Additional Info
However, if I use regular Location filter, then it works, i.e
There are two separate issues to address here:
LOOKUP(ATTR([Location (Loc)]),0) is a sneaky way of filtering the data in the view while still maintaining all of the locations in the partition (by disguising the field as a table calculation, the filtered partition is created before this table calculation is ever executed). Because you've used it here, you still have every location in the partition, even when you filter them out with the quick filter. Because they're still in the partition, when you calculate the percent of total, those other locations will be included in that total, even if they're not displayed in the view.
I don't see a reason for you to keep all of the locations in your partition in this case, so I'd just replace that filter with [Location].
It looks like you've dragged [Location] into your mark as a dimension. As a result, it's broken up the pie slices into smaller chunks, one per location. If you add a dimension to your data, then Tableau will have to group by that dimension when calculating the aggregations.
If you want the Location to appear in the tooltip of your pie chart, you'll have to either add it as an attribute (in which case you'll have to deal with the "*" when you have more than one location in the partition), or you'll just have to deal with the slices being broken up further.

Resources