0
votes

I'm using the tableau superstores dataset in which I'm interested in the fields:

  • Sales
  • Region
  • Sub-category (sub-category of product).

I wanted to find the bottom three sub categories in terms of sales. So I created a calculated field Bottom three using the formula RANK(SUM([Sales]),'asc') <= 3.I got this viz : Bottom three sales.

Now I wanted to display the sum of sales of the bottom three sub-categories in the dashboard. How do I find this? I'm quite new to tableau and visualisation and I'm not sure how to do this. I tried displaying a table with

  • Rows : Bottom three
  • Columns : Categories
  • Cells : Sales

I tried using Total in analytics tab on each row, but I'm getting an error saying can't apply total to a discrete value.

So how do I do this?

1

1 Answers

0
votes

To get the total of the bottom 3 use 2 calculated fields:

IF RANK(SUM([Sales]),'asc') <= 3 THEN SUM([Sales]) END

Then WINDOW_SUM that field. Assuming you call if Bottom3Sales:

WINDOW_SUM([Bottom3Sales])

Put this field on the Detail shelf, then you can show the total of the bottom 3 in the chart title.