I have to recreate a Tableau visualization that is currently created with python (plotly). I have a dataset which contains

1.0K    Asked by AlisonKelly in Tableau , Asked on Dec 10, 2019
Answered by Asutosh Jha

● OrderID,int

● OrderDate,DateTime

● LeadTime to order, days

I would like to create a grouped bar chart (2 groups) containings the total orders received (count(orderID)) and also another group of orders which were done below 5 working days. I am a newbie to Tableau and I need some help. Let me know how I can produce a grouped bar chart with these two groups.

To do this, we need to create the calculated fields to get the desired result-

1. { FIXED DATETRUNC('month', [Order Date]):COUNT([Order ID])}

2. { FIXED DATETRUNC('month', [Order Date]):COUNT(if [Lead Time To Order]<= 5 then [Order ID] END)}

3. (SUM([Total Order])-AVG([Within 5 days]))/SUM([Total Order])

Once created, use first calculation in row shelf and then 2nd in the canvas which should make like below-




Your Answer

Interviews

Parent Categories