0
我有一個按季度更改季度的費率表。Tableau按季度創建運行總和
即
+--------+-------+------+
| Q1 | | |
+--------+-------+------+
| Sales | | Rate |
| <1000 | | 1% |
| >=1001 | <2500 | 2% |
| >=2501 | | 3% |
+--------+-------+------+
| Q2 | | |
+--------+-------+------+
| Sales | | Rate |
| <1500 | | 1% |
| >=1501 | <3000 | 2% |
| >=3001 | | 3% |
+--------+-------+------+
等。
我創建了一個季度領域:
if month([booking_date]) = 1 then 1
ELSEIF month([booking_date]) = 2 then 1
ELSEIF month([booking_date]) = 3 then 1
ELSEIF month([booking_date]) = 4 then 2
ELSEIF month([booking_date]) = 5 then 2
ELSEIF month([booking_date]) = 6 then 2
ELSEIF month([booking_date]) = 7 then 3
ELSEIF month([booking_date]) = 8 then 3
ELSEIF month([booking_date]) = 9 then 3
ELSEIF month([booking_date]) = 10 then 4
ELSEIF month([booking_date]) = 11 then 4
ELSEIF month([booking_date]) = 12 then 4
END
並試圖所有類型的方式,使相當於:
Qtly射精。銷售
如果季= 1個,則總和(銷售部) ELSEIF季度= 2,那麼總和(銷售) 等等
,所以我將結束與
+-----------------+-----+-----+-------+-------+-----+------+
| | Jan | Feb | March | April | May | June |
+-----------------+-----+-----+-------+-------+-----+------+
| Sales | 200 | 350 | 500 | 400 | 500 | 700 |
| Qtly Cum. Sales | 200 | 550 | 1050 | 400 | 900 | 1600 |
| rate | 1% | 1% | 2% | 1% | 1% | 2% |
+-----------------+-----+-----+-------+-------+-----+------+
那麼,到底是什麼錯誤?我所理解的是,你有銷售價值,你必須每個季度返回,所以你創造一個檢查月份的領域,並且你返回1或2或3或4的月份。你究竟在哪裏卡住? –
我所能做的只是讓累積的銷售額從1月份開始累計,而不是按季度累計。 – Phil409