Google Chart Visualization different number of bars - google-visualization

Hi I am trying to make a bar chart using the google bar chart visualization https://developers.google.com/chart/interactive/docs/gallery/barchart
I want to ask if I can use different number of bars for each field..
Let's say I have Asia, Europe, Africa and I have one bar for population in each of them. I want to add another bar ONLY in Europe for the average death rate.
As far as tried I couldn't find a way to do it, as you define the number of the bar and the titles from the beginning which include all the fields (Asia,Europe,Africa) so you can't add an addition bar for only one field.. Any idea?

Why not initialized the fields you don't want to 0 ?

Related

power bi taking count of number

iam taking simple clustered bar chart and want to take top 10 rows of computers that goes out of warranty
so ideally my chart should look like this
but instead my bar chart is looking like
i dont want count of count of count
can you please help me out how to add exact number in bar chart or am i taking wrong visual?
I believe you need to change your X via rightclick on the "Values"-Slot to something more like "Minimum", "SUM" or "Average". PowerBI doesn't seem to know you have one value only and attempts to group them. Hence it informs you that the "count of values(count)" is always one.

How to set the data label for stacked bar graph to include total count for each bar in Quicksight

In Quick sight, when using the stacked bar graph, the data label will just show the count for each group, no total number shown. It is not convenient since audiences need to add those number by themselves. Would anybody help me solve this problem? cheers

How to get multiple category lines with bar chart in Power Bi?

Sample Data.
CompanyA,2019-01-01,29000
CompanyA,2019-02-01,35000
CompanyA,2019-03-01,43000
CompanyA,2019-04-01,27000
CompanyA,2019-05-01,45000
CompanyA,2019-06-01,21000
CompanyA,2019-07-01,26000
CompanyA,2019-08-01,27285
CompanyA,2019-09-01,26035
CompanyA,2019-10-01,24785
Expected Output.
My Boss has asked me to show sale trend by companies and month. but he wants it to be shown like below.
X axis should have Month Names
Bar lines should tell overall sales amount by month.
multiple lines should represent company sales amount.
i have achived this output by replacing 2 charts on each other (hidden one background). 
First i have taken a CLUSTERED COLUMN CHART and place a Line chart on it with hidden background.
Sample File
But for me this is just an adhoc solution and One more problem is that both chart's y axis doesn't match.
seeking for a good solution on this. either another good chart to represent this kind of data or how to achive it any other way?
Thanks in advance.
You can create measures for individual company, if number of companies is not a big number, and then put them in "Line values" to achieve the same result as above.
So For ex, if you have 5 companies in the data then create 5 different measures like below
CompanyA = calculate(sum(sales), filter(tbl, [company] = "CompanyA"))
like the above ex create measures for other 4 companies also

How to show and hide the pie chart in Power BI

I have a requirement where I need to create the Pie Chart for all available EventTypes. For example I have following EventTypes available in my system.
Buy
Sell
Hold
Buy Back
Now if a company has only two types of EventTypes like "Buy" & "Sell" then Power Report should show only two charts and if another company has three EventTypes like "Buy", "Sell" & "Hold" then same Power BI report should show the three pie charts.
I have two approaches to achieve this.
Approach 1: Create pie chart for all possible EventTypes and show and hide the pie chart based on the EventTypes available for given company. So how I can show and hide the pie chart in this approach.
Approach 2: Thinking to create the pie chart on the fly (If possible in PowerBI) as I could have done many time in SSRS using list. If possible how can I do this?
Approach 1 should work OK, I think.
Create a chart for each of the four EventType values and write measures or use filters such that the chart values return BLANK() for non-existing EventType values.

How to group measures to display on a Power Bi Clustered chart?

I have several measures computed and I am placing them on the Line and Clustered column chart to display them side by side. The challenge I am having right now is i can not group them for displaying on the Chart. Please see the attached screenshot.
As you see all the measures are appearing one next to the other, total of 10. I want to separate them and show them as a group of two. Is this possible to do, may be by using other type of chart? I have to use the measures coz they contain computed values from the dataset imported.
If any one has an idea over this, please help. Thanks in advance.
Create a new table with one column containing all of the groups that you want. For example: Gross, Net, and Total and put that Group column on the clustered bar chart axis.
Create a measure for the first bar of each group and a measure for the second bar each group. For example:
Actual = SWITCH(SELECTEDVALUE(Groups[Group]),
"Net", [NetActual],
"Gross", [GrossActual],
"Total", [TotalActual])
Budget = SWITCH(SELECTEDVALUE(Groups[Group]),
"Net", [NetBudget],
"Gross", [GrossBudget],
"Total", [TotalBudget])
Now put the Actual and Budget measure on in the bar chart Value field and you should get something like this: