Flagging margin risk by sub-category

Mark Yourself Question

  1. Grab a piece of paper and try this problem yourself.
  2. When you're done, check the "I have answered this question" box below.
  3. View the solution and report whether you got it right or wrong.

A Tableau view has Sub-Category on Rows and one mark per sub-category. Management wants a field to put on Color that labels a sub-category "Margin risk" when both of these hold:

  • its profit ratio (total profit divided by total sales) is below 5%;
  • its total sales exceed $50,000.

Every other sub-category should be labelled "Healthy".

  1. Write the calculated field.
  2. State whether it is a row-level or an aggregate calculation, and explain why that choice is required.
  3. A colleague proposes IF [Profit] / [Sales] < 0.05 AND [Sales] > 50000 THEN "Margin risk" ELSE "Healthy" END. Explain what this formula evaluates and why it does not meet the requirement.

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

More Tableau Calculations Questions: