Join the discussion
Question 25/43
A client wants to use a bar chart to visualize the trend in profit per quarter for the last 5 years. They want each bar's color to be determined by whether the profit during that quarter was greater than the median profit for the past four quarters, including the current quarter.
For example, if a bar represents profit for 2020 Q4, they want to visually see whether the profit for 2020 Q4 is greater than the median profit for 2020 Q1-2020 Q4.
Which table calculation should produce the desired result?
For example, if a bar represents profit for 2020 Q4, they want to visually see whether the profit for 2020 Q4 is greater than the median profit for 2020 Q1-2020 Q4.
Which table calculation should produce the desired result?
Correct Answer: C
Comprehensive and Detailed Explanation From Exact Extract:
The requirement is to compare each quarter's profit to the median profit over a rolling window of the last four quarters, including the current one. This is a classic use case for WINDOW_ table calculations in Tableau.
Tableau documentation explains:
* WINDOW_MEDIAN( expression, start, end ) computes the median of the expression over a window of rows defined by start and end, which are offsets relative to the current row.
* To create a rolling calculation that includes the current row and the three preceding rows, the window frame must span four rows ending at the current row.
Conceptually, the correct pattern is:
* Current quarter's profit: SUM([Profit])
* Rolling four-quarter median: WINDOW_MEDIAN(SUM([Profit]), previous_3, current) In actual Tableau syntax, that pattern is written with a frame that begins three rows before the current row and ends at the current row.
Among the options provided:
* Options A and B use INDEX() or FIRST() as the start of the window, which creates frames anchored to either the first row or varying positions in the partition, not a consistent four-quarter trailing window.
* Option D anchors the frame relative to LAST(), which makes the window depend on the final row in the partition, not a trailing four-quarter window for each bar.
Option C uses a fixed frame of four rows expressed as (3, 0) in the argument list. While, in exact Tableau syntax, a trailing 4-row frame is typically written with a negative start offset and zero as the end offset, this option is clearly intended to represent the frame "three rows back through the current row" and is therefore the only answer that matches the required rolling four-quarter window conceptually.
So, using a WINDOW_MEDIAN over a four-row frame ending at the current row, as shown in option C, is the intended solution for coloring each bar based on whether:
SUM([Profit]) > rolling_median_over_last_4_quarters
* Tableau table calculation reference describing WINDOW_ functions and their start/end frame parameters.
* Examples in Tableau help that use WINDOW_SUM or WINDOW_AVG with a frame spanning a fixed number of previous rows to compute rolling-window metrics.
* Best practices for using WINDOW_MEDIAN to compute rolling medians over sliding time windows.
The requirement is to compare each quarter's profit to the median profit over a rolling window of the last four quarters, including the current one. This is a classic use case for WINDOW_ table calculations in Tableau.
Tableau documentation explains:
* WINDOW_MEDIAN( expression, start, end ) computes the median of the expression over a window of rows defined by start and end, which are offsets relative to the current row.
* To create a rolling calculation that includes the current row and the three preceding rows, the window frame must span four rows ending at the current row.
Conceptually, the correct pattern is:
* Current quarter's profit: SUM([Profit])
* Rolling four-quarter median: WINDOW_MEDIAN(SUM([Profit]), previous_3, current) In actual Tableau syntax, that pattern is written with a frame that begins three rows before the current row and ends at the current row.
Among the options provided:
* Options A and B use INDEX() or FIRST() as the start of the window, which creates frames anchored to either the first row or varying positions in the partition, not a consistent four-quarter trailing window.
* Option D anchors the frame relative to LAST(), which makes the window depend on the final row in the partition, not a trailing four-quarter window for each bar.
Option C uses a fixed frame of four rows expressed as (3, 0) in the argument list. While, in exact Tableau syntax, a trailing 4-row frame is typically written with a negative start offset and zero as the end offset, this option is clearly intended to represent the frame "three rows back through the current row" and is therefore the only answer that matches the required rolling four-quarter window conceptually.
So, using a WINDOW_MEDIAN over a four-row frame ending at the current row, as shown in option C, is the intended solution for coloring each bar based on whether:
SUM([Profit]) > rolling_median_over_last_4_quarters
* Tableau table calculation reference describing WINDOW_ functions and their start/end frame parameters.
* Examples in Tableau help that use WINDOW_SUM or WINDOW_AVG with a frame spanning a fixed number of previous rows to compute rolling-window metrics.
* Best practices for using WINDOW_MEDIAN to compute rolling medians over sliding time windows.
Add Comments
- Other Question (43q)
- Q1. A business analyst is creating a view of the top 10 customers for each region. The analyst...
- Q2. A client wants to see the average number of orders per customer per month, broken down by ...
- Q3. A client is searching for ways to curate and document data in order to obtain data lineage...
- Q4. An executive-level workbook leverages 37 of the 103 fields included in a data source. Perf...
- Q5. A consultant builds a report where profit margin is calculated as SUM([Profit]) / SUM([Sal...
- Q6. A client is working in Tableau Prep and has a field named Orderld that is compiled by coun...
- Q7. A client is searching for ways to curate and document data in order to obtain data lineage...
- Q8. A client has a pipeline dashboard that takes a long time to load. The dashboard is connect...
- Q9. From the desktop, open the CC workbook. Open the Incremental worksheet. You need to add a ...
- Q10. SIMULATION Use the following login credentials to sign in to the virtual machine: Username...
- Q11. A client is using Tableau to visualize data by leveraging security token-based credentials...
- Q12. Which technique should a Tableau consultant use to make visualizations faster?...
- Q13. A shipping clerk wants to use a Sankey diagram to analyze the flow of goods between differ...
- Q14. A business analyst needs to create a view in Tableau Desktop that reports data from both E...
- Q15. A client wants to see data for only the most recent day in the dataset that is updated int...
- Q16. A client notices that while creating calculated fields, occasionally the new fields are cr...
- Q17. A consultant creates a histogram that presents the distribution of profits across a client...
- Q18. A client wants to migrate their Tableau Server to Tableau Cloud. The Tableau Server is con...
- Q19. A client wants to view stores serviced by delivery drivers on a map. The have the informat...
- Q20. A consultant is designing a dashboard that will be consumed on desktops, tablets, and phon...
- Q21. SIMULATION From the desktop, open the CC workbook. Open the Manufacturers worksheet. The M...
- Q22. An online sales company has a table data source that contains Order Date. Products ship on...
- Q23. A client wants to grant a user access to a data source hosted on Tableau Server so that th...
- Q24. From the desktop, open the CC workbook. Use the US Population Estimates data source. You n...
- Q25. A client wants to use a bar chart to visualize the trend in profit per quarter for the las...
- Q26. A consultant builds a report where profit margin is calculated as SUM([Profit]) / SUM([Sal...
- Q27. A client is evaluating which user roles to assign to managers. The managers need to view d...
- Q28. From the desktop, open the CC workbook. Open the Manufacturers worksheet. The Manufacturer...
- Q29. A client's dashboard has two sections dedicated to their shops and warehouses shown when a...
- Q30. A client calculates the percent of total sales for a particular region compared to all reg...
- Q31. A client wants to produce a visualization to show quarterly profit growth and aggregated s...
- Q32. In what way does View Acceleration improve performance?...
- Q33. A multi-national company wants to have a Tableau dashboard that will provide country-level...
- Q34. An online sales company has a table data source that contains Order Date. Products ship on...
- Q35. A customer wants to leverage generative AI capabilities. The customer is currently on Tabl...
- Q36. A client has a large data set that contains more than 10 million rows. A consultant wants ...
- Q37. A client has a large data set that contains more than 10 million rows. A consultant wants ...
- Q38. During a Tableau Cloud implementation, a Tableau consultant has been tasked with implement...
- Q39. A client calculates the percent of total sales for a particular region compared to all reg...
- Q40. A client wants to report Saturday and Sunday regardless of the workbook's data source's lo...
- Q41. A company's Tableau Cloud admin wants to maintain control over what content gets published...
- Q42. A client wants to see data for only the last day in a dataset and the last day is always y...
- Q43. A client has a database that stores widget inventory by day and it is updated on a nonstan...
[×]
Download PDF File
Enter your email address to download Salesforce.Analytics-Con-301.v2026-03-19.q43.pdf
