Tableau Challenges #8 Link Tableau Challenges Solutions #8 Link
Join the Vizuators team!
Website: https://vizuators.by/ Telegram: https://t.me/viz_techreview Tableau Public: https://public.tableau.com/app/profile/vizuators.challenges Youtube: https://www.youtube.com/c/Vizuators Instagram: https://instagram.com/vizuators Facebook: https://www.facebook.com/vizuators.by/ Twitter: https://twitter.com/vizuators LinkedIn: https://www.linkedin.com/company/vizuators
Abstract author: Ekaterina Kalabush
Build a visualization of the Highlight table type, which for each month will highlight the most profitable subcategory in blue, the least profitable one in red. Leave the remaining cells by default.
Step 1: Drag Order Date (Month) to Columns, Sub-Category to Rows, Profit to Text.
Step 2: Create a Calculated Field Color Max/Min. In simple words: if the amount of profit is equal to the maximum for the month (then we will configure it correctly), then show the maximum profit, if the amount of profit is equal to the minimum for the month (then we will configure it correctly), then show the minimum profit, otherwise nothing.
IF SUM([Profit]) = WINDOW_MAX(SUM([Profit])) THEN "Max Profit" ELSEIF SUM([Profit]) = WINDOW_MIN(SUM([Profit])) THEN "Min Profit" END
Step 3: Drag the Color Max/Min pill to Color and configure the table calculation Computer Using → Table (down) so that calculations are done not by Sub-Category, but by months.
Step 4: Change the color of the maximum and minimum values. We change the chart type to Square and set the maximum size.
Step 5: We add quotation marks to Columns and Rows to align the cells, and then hide them on the visualization.
Done! We have created a table that highlights the most profitable subcategory in blue for each month, and the least profitable one in red.
In the video, Anastasia demonstrates a solution using RANK_UNIQUE
, and Julia - using LOD