Clustered Stack Bar chart in Google Data Studio - charts

I have a requirement to create a clustered stacked bar chart with Google Data Studio.
Sample Data looks like,
owner_name
closing_price
open_price
won_price
won_count
total_count
Owner1
408000
500000
408000
4
5
Owner1
549000
550000
549000
3
6
Owner1
320000
350000
320000
2
7
Owner2
120000
120000
120000
4
8
Owner2
400000
500000
400000
5
9
Owner2
800000
900000
800000
7
8
Owner2
456000
460000
456000
8
9
Owner3
659000
660000
659000
9
10
Sample Dataset - https://docs.google.com/spreadsheets/d/1M8EcQC8rXSuyOP_SUYjgGISbLNEurEqo15rxHLlgrRk/edit?usp=sharing
Dimension -
owner_name
Metrics
SUM of won_price
On top of the SUM of won price bar there should be SUM(open_price + won_price) - This is a stacked bar
Next to that bar there should be SUM(won_price/100 * 75%)
On top of the point 3 bar there should be SUM(open_price)
(these dimension and metrics might be wrong as I've defined these)
Also the owner_name in X Axis label should looks like,
Owner1
2 Won Deals
(4 Deals)
It should looks like below image. Tried many things. But ended up with the following 2nd image result.
Expected Result
Result What I Got
Report I tried can be found here
Is there any possibility to achieve above type clustered stacked bar chart in google data studio?

Related

Filtering a column per a maximum value to show on histogram

I want to show on the histogram only the values from the 2nd major week.
Example: I have this table with "Week" and "feature_value". And week "6" is the 2nd major week.
Week feature_value
3 10,1
4 10,5
5 10,7
5 10,3
6 11,1
6 10,7
7 10,3
Basically What I want is this:
Week feature_value
6 11,1
6 10,7
I succeed doing it in qliksense table with this formula:
=Num(Aggr(distinct IF(max(Week,2),feature_value),feature_value))
But, when I use it on the histogram it appears "The chart is not displayed because it contains only undefined values."
See below the error:
Does anybody know how to solve it?

Tableau display 3 measures in 1 column

I am building a report in Tableau with 4 fields. 3 of these fields are measure fields. This is what it looks like.
Name Sum Profit Loss
Emmy 15 10 5
Sara 23 18 2
Dave 10 1 2
But, I want it to look like this. I want a new column called metrics that pulls in those 3 values.
Metrics
Emily 15
10
5
Sara 23
18
2
Dave 10
1
2
May I have some guidance on how I can approach this?
The easiest way to solve this is by bringing "Measure Names" to Rows
You can hide the header names of the measures as well. hope that helps

Running total using two columns

Given a table with data like:
A
B
Qty.
Running Total
5
5
5
10
5
15
I can create the running total using the formula =SUM($A$2:A2) and then drag down to get the running total after each quantity (here Qty.)
What may I do for calculating running total using two columns which may or may not be consecutive as shown below:
A
B
C
D
Qty. 1
Other
Qty. 2
RT
2
blah
2
4
2
phew
2
8
3
xyz
2
13
Place in cell D2 the formula =SUM(A2,C2,D1). Do not pay attention to the fact that the function will refer to a non-numeric cell D1 - the SUM() function will not break, unlike ordinary addition =A2+C2+D1. Now, just stretch the formula down.

How to group a column in tableau based on value of another column

I am new to tableau and need help in figuring this out.I have a dataset in below format:
hid:id for the house the customer belong
cid:customer id
hID CustomerID
1 A
1 B
1 C
2 D
2 E
3 F
3 G
3 H
3 I
4 J
5 K
5 L
5 M
5 N
5 O
So A,B belong to house 1 so count of hid '1' is 3 so:
hid count of members
1 3
2 2
3 3
4 1
5 5
I want to show a graph in tableau as size of house that is X-axis :Size of house and Y-axis :Count no of house with same size so for above data the values as below:
Size of house no of house
1 1
2 1
3 2
4 0
5 1
The final graph should be:
In Tableau jargon, you're looking to bin based upon an aggregate value. Take a look at the following blog post for a more detailed description/walk-through.
One way to accomplish this is by leveraging talbeau's level of detail calculations. Creating a calculated field along the lines of:
{FIXED [hID] : COUNTD([CustomerID])}
You can then create a bin field by right clicking on the new field and binning based on a parameter, or a a static size (1?) of your choosing.
To create the visual, place this second bin field on the row shelf and on the column shelf drag the hID dimension and right click to convert to a measure by selecting Count Distinct.
As a side note, depending on whether you set your bin field as continuous or discrete, the 4 bin in your sample data will or will not appear.

Crystal report percentage difference between 2 columns in crosstab

Not sure if this is possible or not in crystal. I have a crosstab report that has 2 columns. I need to take the percentage between the 2 values. Here is a quick sample of what I need it to look like:
Type 1 Type 2 Type 3 Total
========== ========== ========== ==========
3/1/2011 2 1 50% 1 1 100% 0 0 0% 3 2 66%
3/2/2011 1 1 100% 3 1 33% 5 3 60% 9 5 55%
Total 3 2 66% 4 2 50% 5 3 60% 12 7 58%
To create column 1 I am just doing a distinct count. To create column 2 I created a formula to the field value to 1 if it is true and 0 otherwise. I set the 3rd column to take the percent by row. The problem is in the row total at the bottom. The counts are correct, but the percentage always shows up as 100%.
I am using crystal reports 2008.
I was able to finally figue this out.
In column 1 I added a distinct count.
Column 2 I added a count based off of a formula:
if MyType = "Whatever" then
1
else
0
The third column was an average (a built in function).
No groupings are needed.