Hi Tableau Community,
I'm working on a dynamic sales & quantity comparison dashboard, and I've hit a roadblock with % difference calculations.
What I’ve Built:
I’ve created a dashboard that allows the user to:
- Select a Start Date and End Date (via parameters)
- Choose a Time Granularity: Month / Quarter / Half-Year / Year
- Select the Metric: Sales or Quantity
- Choose how many previous periods to compare (1–5)
My data has:
- Date field:
- COMMERCIAL_INVOICE_DATE
- Sales field:
- net value in Lakh
- Quantity field:
- TOTAL_QUANTITY
What’s Working:
- I created dynamic period groupings (e.g., Current Period, Previous 1, Previous 2…)
- I’ve built a dynamic "Final Label" field to show friendly names like “FY 2024 – Q2” or “Previous 1”.
- I created [Current Period Value] and [Previous Period Value] fields based on selected granularity and date range.
- These values show correctly in the table view when I use "Final Label" in Columns.
What’s NOT Working:
- When I apply a Quick Table Calculation → Percent Difference on the [Selected Measure Aggregate], it shows correct values only when "Final Label" is removed.
- Once I bring "Final Label" back into the Columns shelf, the % Difference disappears or becomes null or incorrect.
What I Need Help With:
- How can I calculate and display the % Difference dynamically for each period (e.g. March 2025 vs March 2024, vs March 2023, etc.) while keeping the Final Label on Columns?
- Is there a workaround or method to allow Table Calculations to still work correctly when Final Label is present?
- Can I build a dynamic % difference label field similar to Final Label (for value) — to display e.g.,
- “+5.4% vs Previous 1”
- “–2.1% vs Previous 2” with arrows?
- Should I compute % difference manually instead of using Tableau's Quick Table Calculation? If yes, how to handle the Compute Using when Final Label is part of the layout?
Layout Summary:
- Columns: Final Label
- Rows: Category (e.g. Customer or Product)
- Text: Selected Measure (Sales or Quantity), Current Period, Previous Period, % Difference
Thank you in advance
Any guidance, calculations, or workbook examples would be a big help.
— Nihar
4 risposte