[英]LoD expression to calculate the average count of one dimension id based on another dimension id in Tableau
I have a dataset consisting of unique trips (IDs), users_id, and bikes_id and time-stamp trips_id, users_id, and bikes_id are dimensions:我有一个由唯一旅行 (ID)、users_id 和 bikes_id 组成的数据集,时间戳 trips_id、users_id 和 bikes_id 是维度:
I would like to show how many rides there are (on average) per user, how many bikes are used (on average) by user and how many rides there are per bike.我想显示每个用户(平均)有多少次骑行,用户(平均)使用了多少辆自行车以及每辆自行车有多少次骑行。 Is there a calculated field or LoD that can do this calculations?
是否有可以进行此计算的计算字段或 LoD? So I can show per week, month or another time period?
所以我可以每周、每月或其他时间段显示?
I would like to show how many rides there are (on average) per user
我想显示每个用户(平均)有多少游乐设施
use this CF (average for whole data)使用这个 CF(整个数据的平均值)
{AVG({FIXED [USER] : COUNTD(TRIP_ID)})}
how many bikes are used (on average) by user
用户(平均)使用了多少辆自行车
use this用这个
{AVG({FIXED [user]: countd(bike_id)})}
how many rides there are per bike
每辆自行车有多少次骑行
use this用这个
{AVG({FIXED [bike_id]: countd(trip_id)})}
NOTE these calcs will give you average for whole dataset注意这些计算会给你整个数据集的平均值
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.