Stacked bar chart in Qlik Sense - stacked-chart

In QlikSense I am trying to create a stacked bar chart. My dataset is looks like:
Country Type Amount
Brazil Cars 10
Brazil Bus 15
Brazil Bike 10
Canada Cars 5
Canada Bus 15
Canada Bike 10
Egypt Cars 5
Egypt Bus 20
Egypt Bike 5
And I would like a graph that looks like the following. However, I can't even select a stacked bar chart if I only add one measure, which is the Amount field. I think I should group by Country, should I also group by Type? Or should I add each Type as measure, is that possible and how can I do that?

You can easily create it in QS
Add barchart object to your sheet
press Add dimension button and pick Country field
press Add measure button and pick Amount and then Sum(Amount)
at this point you will have chart that looks like this:
From the properties panel on the right under Data --> Dimensions press Add button and pick Type field
now your chart looks like this:
from the properties panel again Appearance --> Presentation --> and pick Stacked
and your chart will be stacked
Live chart here

Related

complex multipart clickable label on dc.js bar chart

I am new to dc.js. I want to build the chart pictured below:
On the top of each bar, there should be values like 2/3. This denotes the number of records for two different categories. I need to show each value in a different color.
Also I have a requirement that the values should be clickable to view the records in separate table when we click on the value.
Can anyone help on this?

How to create a QuickSight histogram visualization using start and end date fields? (GANTT chart)

I plan on displaying the availability of my data by having the start and end date on the x-axis and the type of data on the y-axis which can be drilled into.
How would I be able to do this? I'm only able to add 2 fields to the histogram visual (x and y axis)?
Workaround:
Calculate min(start dates)
Calculate difference between min(start date) and start date in days
Calculate difference between start date and end date in days
Use a horizontal stacked bar chart visual with bar 1 as the gap between the difference between min(start date) and start date. Match the color of this bar with the background color. Have bar 2 as a different color which displays the difference in days between the start and end dates.
Unfortunately, it doesn't seem possible to have the dates appear on the x-axis, so it would be better to hide the axis entirely.
In order to view the start and end dates associated with a bar, add these values in the tooltips.

SSRS Matrix Tablix with Trend Chart in One Column And Stacked Bar Chart in Another Column

I need to combine a trend chart onto one column of a matrix and a stacked bar chart into another column – similar to this. I have a label that runs over the top, which is why I don’t want to do two separate matrixes side by side.
Right now I have two different datasets for each.
If it was a roll up bar chart – I could just join the data sets and use aggregations for the bar chart – but with the stacked bar chart the issue of nominal values is tripping me up.
Sorta figured it out.
The key was to make the stacked bar chart a subreport. Then in the SQL for the dataset, add a WHERE Label = [Label passed in from Matrix row]

How to draw timeseries chart by month,year with d3js

I'm looking for a way to visualize data with d3.js.
Currently i have bar charts for each week but i want to be able to have an options that can allow me to visualise bar charts monthly or yearly.
Is there any option to draw Bar Chart with weekly, monthly values ?
Without having any other context around what your data looks like etc., this should serve as a good starting point:
http://bl.ocks.org/mbostock/3884955

dc.js cap ordinal bar chart

dc.js has a Cap mixin which allows one to limit the number of groups and display the remainder in an "others" group. How does one access this behavior or exclude the remainder in a bar chart?
I am using a bar chart as I want to show a top 5 with stacked data. For example, the top 10 car manufacturers based on the total of fleet and private sales (in separate stacks). I am using a function to dynamically generate 5 ordinals (i.e. car manufacturers) for the x axis in the order that I want, and the graph generates nearly as expected. However, a separate bar containing the values that don't fit into one of the x values is placed at the start of the graph.
I've added a snapshot of the chart below. Note that I've rotated it with renderlet so it's on its side.
How do I remove the extraneous bar (at the top)?
If not possible, I may contemplate using two row charts side by side with one flipped so that the origin is on the right.
Sigh, the bar chart is not capped, and the row chart is not stacked. Hope to fix that.
That extraneous bar looks... not right.
With capped charts, you can eliminate the "others group" by setting the othersGrouper falsy. With the bar chart you would have to implement a "fake group" using the techniques documented here:
https://github.com/dc-js/dc.js/wiki/FAQ#filter-the-data-before-its-charted
... at least for now.

Resources