您可以看到我的样本Tableau工作簿here。
如果创建一个正在运行的总计视线,然后隐藏一些列,则工作表的基础数据不会更改,并且视线仍然有效。但是,如果您尝试使用基于表计算功能(例如lookup()
)的过滤器来实现相同目的,则会跳过一些值而使可视化变得混乱。最有可能是tableau中的一个错误,但真的想知道是否有解决方案。
使用class ViewController: UIViewController,UITextViewDelegate {
@IBOutlet weak var textView: UITextView!
override func viewDidLoad() {
super.viewDidLoad()
textView.delegate = self
}
func textViewDidChange(_ textView: UITextView) {
// avoid new lines also at the beginning
textView.text = textView.text.replacingOccurrences(of: "^\n",with: "",options: .regularExpression)
// avoids 4 or more new lines after some text
textView.text = textView.text.replacingOccurrences(of: "\n{4,}",with: "\n\n\n",options: .regularExpression)
}
}
函数之一。例如:根据WINDOW
计算的WINDOW_MAX(MAX(YEAR([Joining Date])))
。 Gender
无效,因为它正在尝试查找每种性别每个月的价值。因此,如果一个月内没有性别的更替,就没有什么可查找的,您会得到这些空白(又名#Missing)。使用在LOOKUP
上计算出的类似WINDOW_MAX
的东西,只会查看整个月,而无论可用的数据如何,它都会取最大值,因此不会引起此问题。