我希望在tableau中有多个符合标准的值。
例如:
if [order status] = cancelled and [dtime] = express then 39
else other end (so it counts number of records *39) 我需要的是不计算记录的数量,而是所有唯一的order_id,所以我使用:
if [order status] = cancelled and [dtime] = express then (countd[order id] * 39)但这是行不通的。
场景:COUNTD(如果
探险类型= "ZEX“,计数bigboxy aj smallboxy = "BIGBOX”和Transporter = "Mall Box“,然后订购Id * 260.6
ELSEIF ([Expedition Type] = "ZEX" and [count bigboxy aj smallboxy] = "BIGBOX" and [Transporter]= "Mall Pick-Up") then [Order Id] * 260.7
ELSEIF ([Expedition Type] = "ZEX" and [count bigboxy aj smallboxy] = "BIGBOX" and [Transporter] = "Ulozenka") then [Order Id] * 260.6
ELSEIF ([Expedition Type] = "ZEX" and [count bigboxy aj smallboxy] = "BIGBOX" and [Transporter] = "--empty--" or [Transporter] = "Cash and Carry" or [Transporter] = "Česká pošta"
or [Transporter] = "DPD" or [Transporter] = "Helicar" or [Transporter] = "Mall doprava" or [Transporter] = "PPL CZ" or [Transporter] = "Speedy Kuryr" or [Transporter] = "TopTrans CZ" or [Transporter] = "WE|DO"
or [Transporter] = "Gebrüder Weiss") then [Order Id] * 260.6 END)

发布于 2021-03-17 23:48:39
COUNTD(如果订单状态=已取消且dtime = express,则订单id结束)* 39
https://stackoverflow.com/questions/66664856
复制相似问题