Showing posts with label Tableau. Show all posts
Showing posts with label Tableau. Show all posts

Friday, May 29, 2026

Top Tableau Scenario-Based Interview Questions Set - 15 (1- 8)

 

How would you identify customers who purchased in consecutive months?

Use a table calculation to compare purchase months for each customer.

Example:

DATEDIFF(
'month',
LOOKUP(MIN([Order Date]),-1),
MIN([Order Date])
) = 1

2. How would you calculate the percentage of orders shipped late?

Divide late orders by total orders.

Example:

SUM(
IF [Ship Date] > [Required Date]
THEN 1
ELSE 0
END
)
/
COUNT([Order ID])

3. How would you identify the customer with the highest lifetime sales?

Use a FIXED LOD to calculate total sales per customer and rank them.

Example:

{ FIXED [Customer ID] : SUM([Sales]) }

Rank:

RANK(
{ FIXED [Customer ID] : SUM([Sales]) }
)
= 1

4. How would you calculate average monthly profit?

Aggregate profit at month level and average it.

Example:

WINDOW_AVG(SUM([Profit]))

Or:

SUM([Profit])
/
COUNTD(DATETRUNC('month',[Order Date]))

5. How would you identify regions where sales exceeded target?

Compare actual sales against target.

Example:

SUM([Sales]) > SUM([Target Sales])

Variance:

SUM([Sales]) - SUM([Target Sales])

6. How would you find customers who have not purchased in the last 6 months?

Calculate days since the last purchase.

Example:

DATEDIFF(
'month',
{ FIXED [Customer ID] : MAX([Order Date]) },
TODAY()
) > 6

7. How would you calculate the average gap between customer orders?

Find the difference between consecutive order dates.

Example:

DATEDIFF(
'day',
LOOKUP(MIN([Order Date]),-1),
MIN([Order Date])
)

Then apply:

WINDOW_AVG(
DATEDIFF(
'day',
LOOKUP(MIN([Order Date]),-1),
MIN([Order Date])
)
)

8. How would you identify the most profitable customer in each region?

Rank customers by profit within each region.

Example:

RANK(SUM([Profit])) = 1

Set Compute Using = Customer and Partition By = Region.

Monday, May 25, 2026

Top Tableau Scenario-Based Interview Questions Set - 11 (1- 15)

 

  1. How would you identify top profit-making customers?
    Rank customers based on Profit measure.
    Example:

    RANK(SUM([Profit])) <= 10
  2. How would you calculate average order quantity?
    Divide total quantity by distinct orders.
    Example:

    SUM([Quantity]) / COUNTD([Order ID])
  3. How would you show only last 30 days sales?
    Filter records using DATEDIFF.
    Example:

    DATEDIFF('day',[Order Date],TODAY()) <= 30
  4. How would you identify products with highest growth?
    Compare current sales with previous period sales.
    Example:

    (SUM([Sales]) - LOOKUP(SUM([Sales]),-1))
    / LOOKUP(SUM([Sales]),-1)
  5. How would you create customer segmentation in Tableau?
    Group customers based on sales value.
    Example:

    IF SUM([Sales]) > 100000 THEN "Premium"
    ELSEIF SUM([Sales]) > 50000 THEN "Gold"
    ELSE "Standard"
    END
  6. How would you identify orders shipped on the same day?
    Compare Order Date and Ship Date.
    Example:

    DATEDIFF('day',[Order Date],[Ship Date]) = 0
  7. How would you calculate sales per region percentage?
    Divide regional sales by total sales.
    Example:

    SUM([Sales]) / TOTAL(SUM([Sales]))
  8. How would you create a dynamic measure selector?
    Use parameter with CASE statement.
    Example:

    CASE [Measure Selector]
    WHEN "Sales" THEN SUM([Sales])
    WHEN "Profit" THEN SUM([Profit])
    WHEN "Quantity" THEN SUM([Quantity])
    END
  9. How would you identify the best month for sales?
    Rank monthly sales values.
    Example:

    RANK(SUM([Sales])) = 1
  10. How would you calculate order processing time?
    Use DATEDIFF between order and shipment dates.
    Example:
        DATEDIFF('day',[Order Date],[Ship Date])
  1. How would you display customers contributing negative profit?
    Filter customers with loss.
    Example:
        SUM([Profit]) < 0
  1. How would you compare sales against target percentage?
    Divide actual sales by target sales.
    Example:
        SUM([Sales]) / SUM([Target])
  1. How would you calculate distinct customer count by region?
    Use COUNTD function.
    Example:
        COUNTD([Customer ID])
  1. How would you create a flag for high-priority orders?
    Use conditional logic on Priority field.
    Example:
        IF [Priority] = "High" THEN "Important"
        ELSE "Normal"
        END
  1. How would you display monthly average profit trend?
    Use AVG aggregation with Month dimension.
    Example:
        AVG([Profit])

Thursday, May 21, 2026

Top Tableau Scenario-Based Interview Questions Set - 7 (1- 10)

 

  1. How would you identify the second highest sales in Tableau?
    Use RANK function and filter for rank = 2.
    Example:

    RANK(SUM([Sales])) = 2
  2. How would you calculate cumulative percentage contribution?
    Use Running Total divided by Total Sales.
    Example:

    RUNNING_SUM(SUM([Sales])) / TOTAL(SUM([Sales]))
  3. How would you show only weekends sales data?
    Filter dates using DATEPART function.
    Example:

    DATEPART('weekday',[Order Date]) IN (1,7)
  4. How would you classify customers as High, Medium, and Low sales?
    Use conditional calculated field based on sales range.
    Example:

    IF SUM([Sales]) >= 100000 THEN "High"
    ELSEIF SUM([Sales]) >= 50000 THEN "Medium"
    ELSE "Low"
    END
  5. How would you create a flag for profit-making orders?
    Use IF condition on Profit field.
    Example:

    IF SUM([Profit]) > 0 THEN "Profit"
    ELSE "Loss"
    END
  6. How would you calculate average sales per customer?
    Divide total sales by distinct customers.
    Example:

    SUM([Sales]) / COUNTD([Customer ID])
  7. How would you display only first purchase date for customers?
    Use FIXED LOD with MIN(Date).
    Example:

    { FIXED [Customer ID] : MIN([Order Date]) }
  8. How would you identify customers with no orders in the last 90 days?
    Compare latest order date with today.
    Example:

    DATEDIFF('day', MAX([Order Date]), TODAY()) > 90
  9. How would you create a Pareto chart in Tableau?
    Combine bars and cumulative percentage line.
    Example:

    RUNNING_SUM(SUM([Sales])) / TOTAL(SUM([Sales]))
  10. How would you calculate profit margin percentage?
    Divide Profit by Sales and multiply by 100.
    Example:

     (SUM([Profit]) / SUM([Sales])) * 100

Bhagavad Gita Wisdom #shorts

https://www.youtube.com/playlist?list=PLQM-BpTd9ZSumxwKgJjuJjlx2OcP_W516 

Wednesday, May 20, 2026

Top Tableau Scenario-Based Interview Questions Set -6 (1- 10)

 

  1. How would you calculate Month-over-Month (MoM) growth in Tableau?
    Compare current month sales with previous month using table calculation.
    Example:

    (SUM([Sales]) - LOOKUP(SUM([Sales]),-1))
    / LOOKUP(SUM([Sales]),-1)
  2. How would you identify the top customer in each region?
    Use RANK function partitioned by Region.
    Example:

    RANK(SUM([Sales])) = 1

    Compute using Customer within each Region.

  3. How would you show customers contributing 80% of sales?
    Use running total percentage on sorted sales.
    Example:

    RUNNING_SUM(SUM([Sales])) / TOTAL(SUM([Sales]))

    Filter values <= 0.8.

  4. How would you create a band chart for min and max sales?
    Use reference bands with MIN and MAX values.
    Example:

    WINDOW_MIN(SUM([Sales]))
    WINDOW_MAX(SUM([Sales]))
  5. How would you compare actual vs forecast sales?
    Use dual-axis chart with actual and forecast measures.
    Example:

    SUM([Actual Sales])
    SUM([Forecast Sales])
  6. How would you identify outliers in sales data?
    Compare values against average and standard deviation.
    Example:

    ABS(SUM([Sales]) - WINDOW_AVG(SUM([Sales])))
    > 2 * WINDOW_STDEV(SUM([Sales]))
  7. How would you create dynamic date filtering?
    Use parameter to select periods like MTD, QTD, YTD.
    Example:

    IF [Date Filter] = "YTD"
    THEN DATETRUNC('year',[Order Date]) = DATETRUNC('year',TODAY())
    END
  8. How would you show last N months dynamically?
    Use parameter with DATEDIFF calculation.
    Example:

    DATEDIFF('month',[Order Date],TODAY()) <= [N Months]
  9. How would you create a funnel chart in Tableau?
    Use calculated negative values for one side of bar chart.
    Example:

    -SUM([Stage Count])

    Place positive and negative bars symmetrically.

  10. How would you display average order value (AOV)?
    Divide total sales by distinct order count.
    Example:

Sunday, May 17, 2026

Top Tableau Scenario-Based Interview Questions Set -3 (1- 10)

 

  1. How would you combine historical and current data?
    Use UNION to append both datasets having same columns.
    Example SQL:

    SELECT * FROM Sales_History
    UNION ALL
    SELECT * FROM Sales_Current

    In Tableau, drag one table below another to create union.

  2. How would you union monthly files automatically?
    Use Wildcard Union in Tableau for files with similar structure.
    Example:

    Sales_Jan.csv
    Sales_Feb.csv
    Sales_Mar.csv

    Use:

    Sales_*.csv

    Tableau automatically combines all matching files.

  3. How would you handle null values?
    Use IFNULL() or ZN() to replace nulls.
    Example:

    IFNULL([Profit],0)

    or

    ZN([Sales])

    to convert NULL into 0.

  4. How would you replace missing dates in a trend chart?
    Convert date to continuous and enable “Show Missing Values.”
    Example:

    MONTH([Order Date])

    Then right-click axis → Show Missing Values.

  5. How would you create a complete date scaffold?
    Create a calendar table containing all dates and join with fact table.
    Example SQL:

    SELECT Calendar.Date, Sales.Amount
    FROM Calendar
    LEFT JOIN Sales
    ON Calendar.Date = Sales.OrderDate

    This ensures all dates appear even without transactions.

  6. How would you show data when no transactions exist?
    Use LEFT JOIN with dimension/scaffold table.
    Example:

    SELECT C.CustomerName, IFNULL(SUM(S.Amount),0)
    FROM Customers C
    LEFT JOIN Sales S
    ON C.CustomerID = S.CustomerID
    GROUP BY C.CustomerName

    Customers with no sales still appear.

  7. How would you use relationship vs join?
    Use Relationships for logical layer and Joins for physical merge.
    Example:
    • Relationship keeps tables separate until query time.
    • Join physically combines rows immediately using Inner/Left Join.
  8. How would you optimize a slow dashboard?
    Reduce marks, avoid unnecessary quick filters, and simplify calculations.
    Example:

    IF SUM([Sales]) > 1000 THEN "High" END

    Replace complex nested calculations with simpler logic.

  9. How would you improve dashboard load time?
    Use extracts instead of live connection and aggregate data.
    Example:

    SUM([Sales])

    at Month level instead of transaction level reduces records processed.

  10. How would you improve filter performance?
    Use Context Filters so Tableau processes smaller datasets first.
    Example:
  • Add Region filter to Context.
  • State filter now works only on selected Region data.
  1. How would you optimize heavy LODs?
    Push calculations to database or simplify FIXED calculations.
    Example:
{ FIXED [Customer ID] : SUM([Sales]) }

Instead of multiple nested LODs, pre-aggregate data in SQL/ETL.


https://www.youtube.com/playlist?list=PLQM-BpTd9ZSumxwKgJjuJjlx2OcP_W516 

Saturday, May 16, 2026

Top Tableau Scenario-Based Interview Questions Set -2 (1- 10)

  1. How would you create a dynamic title?
    Create a calculated field or directly insert parameter/filter values into the title.
    Example Title:

    Sales Report for YEAR[Order Date])

    Or use:

    "Sales for " + [Region]
  2. How would you show KPI cards with arrows?
    Create a KPI calculation comparing current vs previous period.
    Example:

    IF SUM([Sales]) > LOOKUP(SUM([Sales]),-1)
    THEN "▲"
    ELSE "▼"
    END

    Use shapes/colors: Green for increase, Red for decrease.

  3. How would you build dependent filters?
    Add Country filter first, then State filter and select “Only Relevant Values.”
    Example: Selecting India shows Karnataka, Delhi, etc., while USA shows Texas, California.
  4. How would you implement cascading filters?
    Use parent-child filters where child values depend on parent selection.
    Example:
    Country → State → City
    Selecting “India” filters only Indian states and cities.
  5. How would you create a customer search box?
    Create a parameter for user input and use a calculated field:

    CONTAINS(LOWER([Customer Name]), LOWER([Search Parameter]))

    Place calculation on Filters and keep TRUE.

  6. How would you drill down Region → State → City?
    Create hierarchy by dragging State under Region and City under State.
    Users can click “+” icon to expand from Region → State → City interactively.
  7. How would you create a reset filters button?
    Create a duplicate dashboard with default filters and use navigation button.
    Clicking Reset redirects users to original dashboard with default filter values.
  8. How would you blend sales and target data?
    Use Sales as primary source and Target as secondary source linked by Region/Date.
    Example Calculation:

    SUM([Sales]) - SUM([Target])

    to show variance.

  9. How would you join 3 tables with different granularity?
    Aggregate lower-granularity tables before joining.
    Example:
    Sales at Order level and Budget at Monthly level → aggregate Sales:

    SUM([Sales])

    by Month before joining.

  10. How would you handle duplicate rows after joins?
    Use FIXED LOD or aggregation to avoid duplicated measures.
    Example:
    { FIXED [Order ID] : SUM([Sales]) }

        This ensures Sales is counted once per Order ID.


https://www.youtube.com/playlist?list=PLQM-BpTd9ZSumxwKgJjuJjlx2OcP_W516